SlideShare a Scribd company logo
1 of 6
Download to read offline
XHTML: Extensible Hypertext Markup Language -- Page 1




XHTML:                                                What is Markup?
                                                      Markup is the process of providing context for
Extensible                                            pieces of information. Markup provides semantic
                                                      weight to elements within information while still
Hypertext Markup                                      keeping the association between all of the ele-
                                                      ments within information. If we think about a
Language                                              physical letter that would be sent to someone as
                                                      an example, the letter itself is one piece of infor-
Brian Talbot
Web Designer                                          mation, but there are various elements that make
Simmons College Web Services                          up a letter such as the Greeting, Address, Body,
July 2005
                                                      Signature and so forth. All of these elements are
                                                      understood to mean different things and that un-
                                                      derstanding comes from the formatting associated
This document is meant to serve primarily as a
                                                      with them.
guide to using XHTML (Extensible Hypertext
Markup Language) and CSS (Cascading Style-
sheets) to create web pages, sites and interfaces.
                                                      What is the difference between HTML,
There are three portions to this guide. The ļ¬rst      XTHML, and XML?
portion details what exactly XHMTL is, its purpose,   XHTML is a transitional step from previous
its history and its future.                           markup languages such as SGML (Standard Gener-
                                                      alized Markup Language) and HTML (Hypertext
The second portion walks through the various          Markup Language). XHTML is very similar to HTML
parts of a correctly written XHTML ļ¬le. How to        as it shares the same expressive possibilities, but
markup content within an XHTML page and using         has a stricter syntax (more rules/practices to fol-
hypertext and media within an XHTML webpage           low). Whereas HTML was an application of SGML,
will be discussed as well.                            a very ļ¬‚exible markup language, XHTML is an ap-
                                                      plication of XML, a more restrictive subset of
The third portion of this guide begins to focus on
                                                      SGML. Currently web browsing technologies sup-
using Cascading Style Sheets to visually style and
                                                      port XHTML and HTML, but cannot however sup-
display the markup created in an XTHML Docu-
                                                      port XML in itā€™s original form. XML must be trans-
ment.
                                                      formed and delivered into a document browsing
                                                      technologies can understand, the general choice is
                                                      XHTML.

What is XTHML?
XHTML, or Extensible Hypertext Markup Language        The benefits of XHTML - A Sound
is one of the most modern building materials for      Structure
creating web pages. As a computer programming
                                                      Because XHTML is based on a stricter language
language that is supported by web browsers and a
                                                      (XML), there is a much stricter format that must be
growing number of other applications, XHTMLā€™s
                                                       followed when marking up information and pre-
purpose it to provide formatting to content using
                                                      senting it in an XHTML ļ¬le.
Markup.
                                                      A stricter format adopted from XML allows for the
Note: Visually styling a web document is not a
                                                      separation of content and the visual presentation
direct responsibility of XHTML, rather CSS (Cas-
                                                      of this content. This has many beneļ¬ts as an
cading Style Sheets) are used to deļ¬ne the visual
                                                      XTHML page can be visually styled by multiple CSS
style of the markup used in an XHTML document.
                                                      documents actively or invisibly providing users
XHTML: Extensible Hypertext Markup Language -- Page 2



with formatting options based on their particular      closing tag is that the command in the closing tag
situations. This comes in handy in some of the
following situations:

ā€£ Printing Documents

ā€£ Projection/Presentation Situations

ā€£ People with disabilities/accessibility issues



This stricter formatting of XHTML also allows the
emergence of a systematic troubleshooting and
validation service. This creates a standard practice
of coding and marking information up.
                                                       is preceded by a forward slash (ā€œ / ā€).

                                                       Note: As we will see, there are some variations to

Creating XHTML                                         this rule where an XHTML tag can close itself,
                                                       these are called ā€˜self closing tagsā€. However, all
XTHML can be written in any text editing software      tags in an XHTML document must be closed.
or in specially designed applications such as Mac-
romedia Dreamweaver. Generally XHTML ļ¬les are
saved as .html ļ¬les. But,, dynamically produced
pages such as .php ļ¬les can also use XHTML.




XHTML Markup
XHTML markup is written in the form of tags. Tags
are commands that tell the web agent how to
process the information (content, media, and me-       Document Structure
tadata) of the webpage.
                                                       An XHTML document has a pre-formatted docu-

Think of tags as wrapper on pieces of candy.           ment structure. All this means is that there are
When looking at the wrappers of candy you know         certain pieces that every XHTML page must have
                                                       in order to be properly formatted as XHTML (which
what ļ¬‚avors and how a candy would taste. A web
                                                       will give all of the beneļ¬ts listed above).
agent, in many cases a web browser, knows how
information should be processed because of the
                                                       An XTHML Document needs to have the following
tag that it is surrounded by. This gives context to
                                                       elements within it:
the information being presented just as the wrap-
per on a piece of candy gives you understanding
                                                       A Document Type (DocType) definition
as to what type of candy it is or may be.
                                                       The ļ¬rst thing placed in an XHTML ļ¬le, the Doc-
A tag command is written within angle brackets         Type deļ¬nition tells the web agent (A web
(ā€œ<ā€ & ā€œ>ā€) and most work like bookends with an        browser, mobile phone, other online devices) what
opening tag and a closing tag. What sits between        type of markup language a page is using. The
the opening and closing tags is what is effected by    agent then takes that information into considera-
that tag. The difference between and opening and       tion when rendering the page and its information
                                                       for the user. A DocType looks like the following
                                                       and is placed at the beginning of the XHTML ļ¬le:
XHTML: Extensible Hypertext Markup Language -- Page 3



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0            -->
Strict//EN"                                             </style>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict          </head>
.dtd">
                                                        Body Tag
<html xmlns="http://www.w3.org/1999/xhtml">
                                                        The Body tag houses all of visible of an XHTML
Note: The code behind a DocType is a bit more           web-page. This is where the bulk of the markup
complicated and can be examined closer by some          will occur. For now a blank body tag looks like the
of the links at the end of this section of the guide.   following.

                                                        <body>
There are various DocType Deļ¬nitions each with
                                                        This is where the content of a webpage would
their own function. HTML has its own document           go and it will be marked up using other XHTML
type deļ¬nition as does RSS (Rich Site Summary).         tags.
                                                        </body>
The point of a DocType is provide the framework
for what type of code can and canā€™t be placed be-       Note: When writing XTHML, line breaks in the code
low and to prepare a userā€™s web agent to handle         do not affect visual display or formatting.
the markup in the best manner possible.
                                                        If all of these elements are placed together, they
Note: The <html> tag that is opened in the ex-          look something like this -
ample above must be closed after everything else
on the page. Thus everything else to follow would       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
                                                        Strict//EN"
be wrapped in an <html></html> tag as every             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict
other tag.                                              .dtd">


Head Tag                                                <html xmlns="http://www.w3.org/1999/xhtml">

The next piece of standard XHTML that is needed         <head>
is the Head Tag portion of the webpage. The Head        <title>The Web Pageā€™s Title</title>

Tag contains information about the page such as         <meta http-equiv="Content-Type" content="text/
its title, any extra information (called metadata)      html; charset=iso-8859-1" />
                                                        <meta name="author" content="Authorā€™s Name" />
about the page as well as references to external
                                                        <meta name="Description" content=ā€A Descrip-
ļ¬les that provide functionality to the page. These      tion of the Webpage"/>
ļ¬les include references to Cascading Style Sheets
                                                        <style type="text/css" media="screen">
(CSS) which contains the rules on how the page is       <!--
visually styled as well as JavaScript which adds        @import "css.css";
                                                        -->
additional web behaviors such as opening new
                                                        </style>
windows.                                                </head>


The Head Tag generally looks like the following,        <body>
                                                        This is where the content of a webpage would
with the paths to external CSS ļ¬les changing de-        go and it will be marked up using other XHTML
pending on where they are stored.                       tags.
                                                        </body>

<head>
                                                        </html>
<title>The Web Pageā€™s Title</title>

<meta http-equiv="Content-Type" content="text/          Note: You can make notes and comments in
html; charset=iso-8859-1" />                            XHTML by placing a ā€œ<!--ā€ at the beginning of
<meta name="author" content="Authorā€™s Name" />
<meta name="Description" content=ā€A Descrip-            your comment and a ā€œ-->ā€ at the end of your
tion of the Webpage"/>                                  comment. A comment will not be seen by the web
                                                        agent and is used commonly to keep track of
<style type="text/css" media="screen">
<!--                                                    things within the code.
@import "css.css";
XHTML: Extensible Hypertext Markup Language -- Page 4



Common XHTML Markup                                 <ol>
                                                    <li>Eggs</li>
The following are tags that are used within the     <li>Milk</li>
                                                    <li>Bread</li>
<body> of an XHTML document.                        <li>Tomatoes</li>
                                                    <li>Figs</li>
Paragraph                                           </ol>

Denotes that the contents within the tag are a      Links
paragraph of text.
                                                    To create a hyperlink to another webpage or
<p>This is a paragraph</p>                          document you would use the anchor tag (<a>),
                                                    which is made up of 2 different parts.
Strong and Emphasis (Bold and Italics)
                                                    1.   Anchor <a> - This is the opening and clos-
To place emphasis on content there are two ways
                                                         ing tag, what makes the text clickable.
to do so, to bold content, you would place strong
tags around the content. To italicize content you
                                                    2.   HyperText Reference ā€œhrefā€ ā€“ An attribute to
would place emphasis tags (<em>) around it.
                                                         the opening anchor tag that tells where to
<strong>This is bolded text</strong>                     link to.

<em>This is italicized text</em>                    If you wanted to have a sentence that linked to
                                                    another website, here is what it would look like
Lists
                                                    in XHTML:
Lists are used to display short amounts of in-
formation that relate to each other in one sense    <a href=ā€http://www.anotherwebsite.com/ā€>This
                                                    link will take you to another website</a>
or another, much as they do in real-life situa-
tions. There are various kinds of lists used in     Images
XHTML, The ordered and the unordered lists
                                                    Images can be placed in an XHTML webpage using
are two of the most common. The ordered is
                                                    the following two part <img> tag can be used to
listed with numbers, the unordered is bulleted.
                                                    reference images inside of XHTML.
Two create these lists you need two tags:

                                                    img ā€“ Indicates to the browser, the following is an
1.   <ul> or <ol> - Depending on which list you
                                                    image
     want. These are needed to open and close
     your list.
                                                    src ā€“ Indicates to the browser where the image is
                                                    actually stored.
2.   <li> - Within the above tag, the list item
     precedes each item you are listing.
                                                    If you had a picture of a ļ¬‚ag called ļ¬‚ag.gif, to
                                                    place this within your page, the tag would look
Hereā€™s an example with the days of the week
                                                    like the following
listed in an unordered list:
                                                    <img src=ā€flag.gifā€ />
<ul>
<li>Monday</li>
<li>Tuesday</li>                                    Note: The <img> tag is one of a few ā€œself-closing
<li>Wednesday</li>                                  tagsā€ in XHTML which do not have an end tag. In
<li>Thursday</li>
<li>Friday</li>                                     this case there is no such thing as a </img> tag,
</ul>                                               but rather the tag is closed by a ā€œ/ā€ at the end of
                                                    the initial tag, <img src />. Please see above in
Hereā€™s an example of a grocery list arranged by
                                                    this guide for further information.
most important item to least important in an or-
dered list:
XHTML: Extensible Hypertext Markup Language -- Page 5



For information on more speciļ¬c XHTML markup           World Wide Web Consoritum (W3C) Official XHTML
you may consult the following list of additional       documentation
resources.                                             http://www.w3.org/MarkUp/

Divisions                                              World Wide Web Consoritum (W3C) XHTML/HTML
Divisions are logical separations of content within    Validator
a page. If for instance there was both a piece of      http://validator.w3.org
content that had numerous paragraphs of infor-
mation which pertained directly to the topic of        Too Easy XHTML - Lowterā€™s Guide

your web-page, you may want to separate that           http://www.lowter.com/articles/178?PHPSESSID=f
from a list of links to supplemental topics that are   088f5baf6035254fde1679764ab2968
not directly related to the main content of the
page and would be placed visually on the right of
the page. This type of content separation can be
obtained by placing each group of content in a         Styling XHTML with Cas-
<div> tag. See the example below:                      cading Style Sheets
<div>                                                  All of the presentational information that is con-
<p>This is my main content</p>
<p>This is more of my main content</p>                 tained and displayed through a webpage are de-
</div>                                                 livered not by the XHTML of a page, but by the

<div>                                                  CSS (Cascading Style Sheets) that are linked in the
<p>This is a set of links to supplemental              <head> tag of an XHTML ļ¬le.
information</p>

                                                       CSS handles both physical layout, placing ele-
<ul>
<li><a href=ā€linkā€>Link 1</a></li>                     ments next to each other the page and also the
<li><a href=ā€linkā€>Link 2</a></li>                     look of things, such as color, font-size and bor-
<li><a href=ā€linkā€>Link 3</a></li>
</ul>                                                  ders.
</div>
                                                       Using CSS allows for far greater accessibility ef-
                                                       forts and allows designers and creators of web-
IDs and Classes                                        page to carefully and universally tailor elements of
                                                       webpages according to their various audienceā€™s
Once an XTHML tag has been written, you can
                                                       needs.
then assign one id and as many classes as you
want to the tag if you wish. IDs and classes are
                                                       Generally the best practice is to keep CSS as ex-
used to further distinguish content and help in the    ternal ļ¬les that are referenced inside XHTML ļ¬les
visual styling of content with CSS. The way you        but stored outside somewhere else. This makes
would add a class or ID can be seen in the exam-       things easier to manage and maintain.
ple below.
                                                       CSS ļ¬les also have a certain format that they need
<p class=ā€food, frozenā€ id=ā€peasā€>This is a
paragraph about frozen peas in the                     to be written in, however this format is more of a
supermarket.</p>                                       list of deļ¬nitions and can be as extensive or sim-
                                                       ple as the author chooses.


Additional XHTML Resources                             Below is an example of a basic CSS deļ¬nition
                                                       which is telling a web agent to place a border
W3Schools XHTML Tutorial
                                                       around any paragraph and also setting a width of
http://www.w3schools.com/xhtml/
                                                       a paragraph to 80% of the entire window.
XHTML: Extensible Hypertext Markup Language -- Page 6



p {
border: 10px solid black;                              Further Information /
width: 80%;
}                                                      Questions, Comments,
The general anatomy of a CSS deļ¬nition or rule         etc.
can be seen below. All parts of the deļ¬nition must
                                                       If you have any questions concerning the creation
be in place for the rule to work and function prop-
                                                       of this guide or anything included below, you may
erly.
                                                       contact the me via the following information:

                                                       Brian Talbot
                                                       Web Designer
                                                       Simmons College Web Services
                                                       300 The Fenway
                                                       Boston, MA 02115

                                                       617-521-2678
                                                       brian.talbot@simmons.edu


A CSS ļ¬le is merely an entire list of these deļ¬ni-
tions. There are numerous combinations of styles
and deļ¬nitions you can use to style XHTML. We
will explore the idea of the cascade of styles along
with some other CSS principles in class further.




More Information on Cascading Style
Sheets
W3Schools CSS Tutorial
http://www.w3schools.com/css/

Styleguide CSS property and value encyclopedia
http://www.stylegala.com/features/css-reference

World Wide Web Consortium (W3C) Official CSS
Documentation
http://www.w3.org/Style/CSS/

World Wide Web Consoritum (W3C) CSS Validator
http://jigsaw.w3.org/css-validator/

An Example of the Power of CSS - CSS Zen Garden
http://csszengarden.com/

More Related Content

What's hot

Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Himanshu Kumar
Ā 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1Lee Lundrigan
Ā 
Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptzahid7578
Ā 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final pptSukanya Sen Sharma
Ā 
The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersRasin Bekkevold
Ā 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html XhtmlAhsan Uddin Shan
Ā 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1Mudasir Syed
Ā 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTERJoel Linquico
Ā 
Html beginner
Html beginnerHtml beginner
Html beginnerwihrbt
Ā 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 htmlAbhishek Kesharwani
Ā 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5Manav Prasad
Ā 
Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLphanleson
Ā 
Xml ppt
Xml pptXml ppt
Xml pptseemadav1
Ā 

What's hot (20)

Xhtml
XhtmlXhtml
Xhtml
Ā 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
Ā 
Xhtml
XhtmlXhtml
Xhtml
Ā 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
Ā 
Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascript
Ā 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
Ā 
The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for Beginners
Ā 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
Ā 
Xhtml
XhtmlXhtml
Xhtml
Ā 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
Ā 
Dhtml
DhtmlDhtml
Dhtml
Ā 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
Ā 
Xhtml
XhtmlXhtml
Xhtml
Ā 
Html beginner
Html beginnerHtml beginner
Html beginner
Ā 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Ā 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
Ā 
Html
HtmlHtml
Html
Ā 
Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XML
Ā 
1. HTML
1. HTML1. HTML
1. HTML
Ā 
Xml ppt
Xml pptXml ppt
Xml ppt
Ā 

Similar to xhtml-documentation

Introdution to HTML
Introdution to HTMLIntrodution to HTML
Introdution to HTMLyashh1402
Ā 
WEB Module 1.pdf
WEB Module 1.pdfWEB Module 1.pdf
WEB Module 1.pdfIbrahimBadsha1
Ā 
Html for Beginners
Html for BeginnersHtml for Beginners
Html for BeginnersSriram Raj
Ā 
www.webre24h.com - [O`reilly] html and xhtml. pocket reference, 4th ed. - [...
www.webre24h.com - [O`reilly]   html and xhtml. pocket reference, 4th ed. - [...www.webre24h.com - [O`reilly]   html and xhtml. pocket reference, 4th ed. - [...
www.webre24h.com - [O`reilly] html and xhtml. pocket reference, 4th ed. - [...webre24h
Ā 
Web standards
Web standards Web standards
Web standards Sukh Sandhu
Ā 
XML
XMLXML
XMLeewiley
Ā 
XML Introduction
XML IntroductionXML Introduction
XML IntroductionBikash chhetri
Ā 
Introduction to Web Services Protocols.ppt
Introduction to Web Services Protocols.pptIntroduction to Web Services Protocols.ppt
Introduction to Web Services Protocols.pptDr.Saranya K.G
Ā 
Rc064 010d Core Html 1
Rc064 010d Core Html 1Rc064 010d Core Html 1
Rc064 010d Core Html 1troopergreen
Ā 
AAUP 2011 Ebook Basics Introduction/Handout
AAUP 2011 Ebook Basics Introduction/HandoutAAUP 2011 Ebook Basics Introduction/Handout
AAUP 2011 Ebook Basics Introduction/Handoutearkin
Ā 
2010 Glossary of E-Publishing Terms
2010 Glossary of E-Publishing Terms2010 Glossary of E-Publishing Terms
2010 Glossary of E-Publishing TermsKrista Coulson
Ā 

Similar to xhtml-documentation (20)

Introdution to HTML
Introdution to HTMLIntrodution to HTML
Introdution to HTML
Ā 
Xml
XmlXml
Xml
Ā 
light_xml
light_xmllight_xml
light_xml
Ā 
Html
HtmlHtml
Html
Ā 
WEB Module 1.pdf
WEB Module 1.pdfWEB Module 1.pdf
WEB Module 1.pdf
Ā 
Why XML is important for everyone, especially technical communicators
Why XML is important for everyone, especially technical communicatorsWhy XML is important for everyone, especially technical communicators
Why XML is important for everyone, especially technical communicators
Ā 
Html for Beginners
Html for BeginnersHtml for Beginners
Html for Beginners
Ā 
Presentation
PresentationPresentation
Presentation
Ā 
XML | Computer Science
XML | Computer ScienceXML | Computer Science
XML | Computer Science
Ā 
www.webre24h.com - [O`reilly] html and xhtml. pocket reference, 4th ed. - [...
www.webre24h.com - [O`reilly]   html and xhtml. pocket reference, 4th ed. - [...www.webre24h.com - [O`reilly]   html and xhtml. pocket reference, 4th ed. - [...
www.webre24h.com - [O`reilly] html and xhtml. pocket reference, 4th ed. - [...
Ā 
Web standards
Web standards Web standards
Web standards
Ā 
Tutor Xml Gxs
Tutor Xml GxsTutor Xml Gxs
Tutor Xml Gxs
Ā 
UNIT-1 Web services
UNIT-1 Web servicesUNIT-1 Web services
UNIT-1 Web services
Ā 
Differences between HTML and XML.pdf
Differences between HTML and XML.pdfDifferences between HTML and XML.pdf
Differences between HTML and XML.pdf
Ā 
XML
XMLXML
XML
Ā 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Ā 
Introduction to Web Services Protocols.ppt
Introduction to Web Services Protocols.pptIntroduction to Web Services Protocols.ppt
Introduction to Web Services Protocols.ppt
Ā 
Rc064 010d Core Html 1
Rc064 010d Core Html 1Rc064 010d Core Html 1
Rc064 010d Core Html 1
Ā 
AAUP 2011 Ebook Basics Introduction/Handout
AAUP 2011 Ebook Basics Introduction/HandoutAAUP 2011 Ebook Basics Introduction/Handout
AAUP 2011 Ebook Basics Introduction/Handout
Ā 
2010 Glossary of E-Publishing Terms
2010 Glossary of E-Publishing Terms2010 Glossary of E-Publishing Terms
2010 Glossary of E-Publishing Terms
Ā 

More from tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
Ā 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>tutorialsruby
Ā 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>tutorialsruby
Ā 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
Ā 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
Ā 
Standardization and Knowledge Transfer ā€“ INS0
Standardization and Knowledge Transfer ā€“ INS0Standardization and Knowledge Transfer ā€“ INS0
Standardization and Knowledge Transfer ā€“ INS0tutorialsruby
Ā 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentationtutorialsruby
Ā 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
Ā 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
Ā 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
Ā 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
Ā 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
Ā 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
Ā 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
Ā 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
Ā 

More from tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
Ā 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
Ā 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
Ā 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
Ā 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
Ā 
Standardization and Knowledge Transfer ā€“ INS0
Standardization and Knowledge Transfer ā€“ INS0Standardization and Knowledge Transfer ā€“ INS0
Standardization and Knowledge Transfer ā€“ INS0
Ā 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
Ā 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
Ā 
CSS
CSSCSS
CSS
Ā 
CSS
CSSCSS
CSS
Ā 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
Ā 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
Ā 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
Ā 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
Ā 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
Ā 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
Ā 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
Ā 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
Ā 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
Ā 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
Ā 

Recently uploaded

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
Ā 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
Ā 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
Ā 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
Ā 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
Ā 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
Ā 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
Ā 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
Ā 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
Ā 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
Ā 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
Ā 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vƔzquez
Ā 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
Ā 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Ā 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Ā 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Ā 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Ā 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Ā 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Ā 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
Ā 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
Ā 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
Ā 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Ā 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Ā 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Ā 

xhtml-documentation

  • 1. XHTML: Extensible Hypertext Markup Language -- Page 1 XHTML: What is Markup? Markup is the process of providing context for Extensible pieces of information. Markup provides semantic weight to elements within information while still Hypertext Markup keeping the association between all of the ele- ments within information. If we think about a Language physical letter that would be sent to someone as an example, the letter itself is one piece of infor- Brian Talbot Web Designer mation, but there are various elements that make Simmons College Web Services up a letter such as the Greeting, Address, Body, July 2005 Signature and so forth. All of these elements are understood to mean different things and that un- derstanding comes from the formatting associated This document is meant to serve primarily as a with them. guide to using XHTML (Extensible Hypertext Markup Language) and CSS (Cascading Style- sheets) to create web pages, sites and interfaces. What is the difference between HTML, There are three portions to this guide. The ļ¬rst XTHML, and XML? portion details what exactly XHMTL is, its purpose, XHTML is a transitional step from previous its history and its future. markup languages such as SGML (Standard Gener- alized Markup Language) and HTML (Hypertext The second portion walks through the various Markup Language). XHTML is very similar to HTML parts of a correctly written XHTML ļ¬le. How to as it shares the same expressive possibilities, but markup content within an XHTML page and using has a stricter syntax (more rules/practices to fol- hypertext and media within an XHTML webpage low). Whereas HTML was an application of SGML, will be discussed as well. a very ļ¬‚exible markup language, XHTML is an ap- plication of XML, a more restrictive subset of The third portion of this guide begins to focus on SGML. Currently web browsing technologies sup- using Cascading Style Sheets to visually style and port XHTML and HTML, but cannot however sup- display the markup created in an XTHML Docu- port XML in itā€™s original form. XML must be trans- ment. formed and delivered into a document browsing technologies can understand, the general choice is XHTML. What is XTHML? XHTML, or Extensible Hypertext Markup Language The benefits of XHTML - A Sound is one of the most modern building materials for Structure creating web pages. As a computer programming Because XHTML is based on a stricter language language that is supported by web browsers and a (XML), there is a much stricter format that must be growing number of other applications, XHTMLā€™s followed when marking up information and pre- purpose it to provide formatting to content using senting it in an XHTML ļ¬le. Markup. A stricter format adopted from XML allows for the Note: Visually styling a web document is not a separation of content and the visual presentation direct responsibility of XHTML, rather CSS (Cas- of this content. This has many beneļ¬ts as an cading Style Sheets) are used to deļ¬ne the visual XTHML page can be visually styled by multiple CSS style of the markup used in an XHTML document. documents actively or invisibly providing users
  • 2. XHTML: Extensible Hypertext Markup Language -- Page 2 with formatting options based on their particular closing tag is that the command in the closing tag situations. This comes in handy in some of the following situations: ā€£ Printing Documents ā€£ Projection/Presentation Situations ā€£ People with disabilities/accessibility issues This stricter formatting of XHTML also allows the emergence of a systematic troubleshooting and validation service. This creates a standard practice of coding and marking information up. is preceded by a forward slash (ā€œ / ā€). Note: As we will see, there are some variations to Creating XHTML this rule where an XHTML tag can close itself, these are called ā€˜self closing tagsā€. However, all XTHML can be written in any text editing software tags in an XHTML document must be closed. or in specially designed applications such as Mac- romedia Dreamweaver. Generally XHTML ļ¬les are saved as .html ļ¬les. But,, dynamically produced pages such as .php ļ¬les can also use XHTML. XHTML Markup XHTML markup is written in the form of tags. Tags are commands that tell the web agent how to process the information (content, media, and me- Document Structure tadata) of the webpage. An XHTML document has a pre-formatted docu- Think of tags as wrapper on pieces of candy. ment structure. All this means is that there are When looking at the wrappers of candy you know certain pieces that every XHTML page must have in order to be properly formatted as XHTML (which what ļ¬‚avors and how a candy would taste. A web will give all of the beneļ¬ts listed above). agent, in many cases a web browser, knows how information should be processed because of the An XTHML Document needs to have the following tag that it is surrounded by. This gives context to elements within it: the information being presented just as the wrap- per on a piece of candy gives you understanding A Document Type (DocType) definition as to what type of candy it is or may be. The ļ¬rst thing placed in an XHTML ļ¬le, the Doc- A tag command is written within angle brackets Type deļ¬nition tells the web agent (A web (ā€œ<ā€ & ā€œ>ā€) and most work like bookends with an browser, mobile phone, other online devices) what opening tag and a closing tag. What sits between type of markup language a page is using. The the opening and closing tags is what is effected by agent then takes that information into considera- that tag. The difference between and opening and tion when rendering the page and its information for the user. A DocType looks like the following and is placed at the beginning of the XHTML ļ¬le:
  • 3. XHTML: Extensible Hypertext Markup Language -- Page 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 --> Strict//EN" </style> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict </head> .dtd"> Body Tag <html xmlns="http://www.w3.org/1999/xhtml"> The Body tag houses all of visible of an XHTML Note: The code behind a DocType is a bit more web-page. This is where the bulk of the markup complicated and can be examined closer by some will occur. For now a blank body tag looks like the of the links at the end of this section of the guide. following. <body> There are various DocType Deļ¬nitions each with This is where the content of a webpage would their own function. HTML has its own document go and it will be marked up using other XHTML type deļ¬nition as does RSS (Rich Site Summary). tags. </body> The point of a DocType is provide the framework for what type of code can and canā€™t be placed be- Note: When writing XTHML, line breaks in the code low and to prepare a userā€™s web agent to handle do not affect visual display or formatting. the markup in the best manner possible. If all of these elements are placed together, they Note: The <html> tag that is opened in the ex- look something like this - ample above must be closed after everything else on the page. Thus everything else to follow would <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" be wrapped in an <html></html> tag as every "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict other tag. .dtd"> Head Tag <html xmlns="http://www.w3.org/1999/xhtml"> The next piece of standard XHTML that is needed <head> is the Head Tag portion of the webpage. The Head <title>The Web Pageā€™s Title</title> Tag contains information about the page such as <meta http-equiv="Content-Type" content="text/ its title, any extra information (called metadata) html; charset=iso-8859-1" /> <meta name="author" content="Authorā€™s Name" /> about the page as well as references to external <meta name="Description" content=ā€A Descrip- ļ¬les that provide functionality to the page. These tion of the Webpage"/> ļ¬les include references to Cascading Style Sheets <style type="text/css" media="screen"> (CSS) which contains the rules on how the page is <!-- visually styled as well as JavaScript which adds @import "css.css"; --> additional web behaviors such as opening new </style> windows. </head> The Head Tag generally looks like the following, <body> This is where the content of a webpage would with the paths to external CSS ļ¬les changing de- go and it will be marked up using other XHTML pending on where they are stored. tags. </body> <head> </html> <title>The Web Pageā€™s Title</title> <meta http-equiv="Content-Type" content="text/ Note: You can make notes and comments in html; charset=iso-8859-1" /> XHTML by placing a ā€œ<!--ā€ at the beginning of <meta name="author" content="Authorā€™s Name" /> <meta name="Description" content=ā€A Descrip- your comment and a ā€œ-->ā€ at the end of your tion of the Webpage"/> comment. A comment will not be seen by the web agent and is used commonly to keep track of <style type="text/css" media="screen"> <!-- things within the code. @import "css.css";
  • 4. XHTML: Extensible Hypertext Markup Language -- Page 4 Common XHTML Markup <ol> <li>Eggs</li> The following are tags that are used within the <li>Milk</li> <li>Bread</li> <body> of an XHTML document. <li>Tomatoes</li> <li>Figs</li> Paragraph </ol> Denotes that the contents within the tag are a Links paragraph of text. To create a hyperlink to another webpage or <p>This is a paragraph</p> document you would use the anchor tag (<a>), which is made up of 2 different parts. Strong and Emphasis (Bold and Italics) 1. Anchor <a> - This is the opening and clos- To place emphasis on content there are two ways ing tag, what makes the text clickable. to do so, to bold content, you would place strong tags around the content. To italicize content you 2. HyperText Reference ā€œhrefā€ ā€“ An attribute to would place emphasis tags (<em>) around it. the opening anchor tag that tells where to <strong>This is bolded text</strong> link to. <em>This is italicized text</em> If you wanted to have a sentence that linked to another website, here is what it would look like Lists in XHTML: Lists are used to display short amounts of in- formation that relate to each other in one sense <a href=ā€http://www.anotherwebsite.com/ā€>This link will take you to another website</a> or another, much as they do in real-life situa- tions. There are various kinds of lists used in Images XHTML, The ordered and the unordered lists Images can be placed in an XHTML webpage using are two of the most common. The ordered is the following two part <img> tag can be used to listed with numbers, the unordered is bulleted. reference images inside of XHTML. Two create these lists you need two tags: img ā€“ Indicates to the browser, the following is an 1. <ul> or <ol> - Depending on which list you image want. These are needed to open and close your list. src ā€“ Indicates to the browser where the image is actually stored. 2. <li> - Within the above tag, the list item precedes each item you are listing. If you had a picture of a ļ¬‚ag called ļ¬‚ag.gif, to place this within your page, the tag would look Hereā€™s an example with the days of the week like the following listed in an unordered list: <img src=ā€flag.gifā€ /> <ul> <li>Monday</li> <li>Tuesday</li> Note: The <img> tag is one of a few ā€œself-closing <li>Wednesday</li> tagsā€ in XHTML which do not have an end tag. In <li>Thursday</li> <li>Friday</li> this case there is no such thing as a </img> tag, </ul> but rather the tag is closed by a ā€œ/ā€ at the end of the initial tag, <img src />. Please see above in Hereā€™s an example of a grocery list arranged by this guide for further information. most important item to least important in an or- dered list:
  • 5. XHTML: Extensible Hypertext Markup Language -- Page 5 For information on more speciļ¬c XHTML markup World Wide Web Consoritum (W3C) Official XHTML you may consult the following list of additional documentation resources. http://www.w3.org/MarkUp/ Divisions World Wide Web Consoritum (W3C) XHTML/HTML Divisions are logical separations of content within Validator a page. If for instance there was both a piece of http://validator.w3.org content that had numerous paragraphs of infor- mation which pertained directly to the topic of Too Easy XHTML - Lowterā€™s Guide your web-page, you may want to separate that http://www.lowter.com/articles/178?PHPSESSID=f from a list of links to supplemental topics that are 088f5baf6035254fde1679764ab2968 not directly related to the main content of the page and would be placed visually on the right of the page. This type of content separation can be obtained by placing each group of content in a Styling XHTML with Cas- <div> tag. See the example below: cading Style Sheets <div> All of the presentational information that is con- <p>This is my main content</p> <p>This is more of my main content</p> tained and displayed through a webpage are de- </div> livered not by the XHTML of a page, but by the <div> CSS (Cascading Style Sheets) that are linked in the <p>This is a set of links to supplemental <head> tag of an XHTML ļ¬le. information</p> CSS handles both physical layout, placing ele- <ul> <li><a href=ā€linkā€>Link 1</a></li> ments next to each other the page and also the <li><a href=ā€linkā€>Link 2</a></li> look of things, such as color, font-size and bor- <li><a href=ā€linkā€>Link 3</a></li> </ul> ders. </div> Using CSS allows for far greater accessibility ef- forts and allows designers and creators of web- IDs and Classes page to carefully and universally tailor elements of webpages according to their various audienceā€™s Once an XTHML tag has been written, you can needs. then assign one id and as many classes as you want to the tag if you wish. IDs and classes are Generally the best practice is to keep CSS as ex- used to further distinguish content and help in the ternal ļ¬les that are referenced inside XHTML ļ¬les visual styling of content with CSS. The way you but stored outside somewhere else. This makes would add a class or ID can be seen in the exam- things easier to manage and maintain. ple below. CSS ļ¬les also have a certain format that they need <p class=ā€food, frozenā€ id=ā€peasā€>This is a paragraph about frozen peas in the to be written in, however this format is more of a supermarket.</p> list of deļ¬nitions and can be as extensive or sim- ple as the author chooses. Additional XHTML Resources Below is an example of a basic CSS deļ¬nition which is telling a web agent to place a border W3Schools XHTML Tutorial around any paragraph and also setting a width of http://www.w3schools.com/xhtml/ a paragraph to 80% of the entire window.
  • 6. XHTML: Extensible Hypertext Markup Language -- Page 6 p { border: 10px solid black; Further Information / width: 80%; } Questions, Comments, The general anatomy of a CSS deļ¬nition or rule etc. can be seen below. All parts of the deļ¬nition must If you have any questions concerning the creation be in place for the rule to work and function prop- of this guide or anything included below, you may erly. contact the me via the following information: Brian Talbot Web Designer Simmons College Web Services 300 The Fenway Boston, MA 02115 617-521-2678 brian.talbot@simmons.edu A CSS ļ¬le is merely an entire list of these deļ¬ni- tions. There are numerous combinations of styles and deļ¬nitions you can use to style XHTML. We will explore the idea of the cascade of styles along with some other CSS principles in class further. More Information on Cascading Style Sheets W3Schools CSS Tutorial http://www.w3schools.com/css/ Styleguide CSS property and value encyclopedia http://www.stylegala.com/features/css-reference World Wide Web Consortium (W3C) Official CSS Documentation http://www.w3.org/Style/CSS/ World Wide Web Consoritum (W3C) CSS Validator http://jigsaw.w3.org/css-validator/ An Example of the Power of CSS - CSS Zen Garden http://csszengarden.com/