SlideShare a Scribd company logo
1 of 6
Download to read offline
Fast and Easy XHTML - XHTML Tutorial, By Shirley E. Kaiser, M.A., SKDesigns - Website Tips at Websitetips.com




 December, 2001, Updated March 2006

 Copyright © 2001-2006, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved.




 Wondering how to turn your HTML markup into XHTML? Here are a few quick tips to

 teach you the very basics, a sample XHTML document, and resources for more

 information.


 If you already know HTML, I suspect you can learn how to implement these markup

 changes within a couple of hours. If you just dig in and give it a try, I think you'll be

 pleasantly surprised to see that it's easier than you may have thought.


 Ready to give it a try? Let's go....



 The Basics
http://websitetips.com/articles/xhtml/basics/ (1 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com




           1. All your markup needs to be in lowercase. For example, instead of <P></P>

                 it needs to be <p></p> for XHTML.

           2. Every tag must have a corresponding ending tag, such as <p></p> and

                 <li></li>. Some tags don't have a corresponding ending tag, such as <br>,

                 <hr>, and others. Those tags, to be backward compatible will look like this

                 instead:


                 <br />

                 <hr />


                 (Below is an XHTML document sample that shows more of these.)

           3. Every attribute value must be in double quotes, such as:

                 <img src="image.gif" height="150" width="40" alt="funny face" />


                 Notice that since the <img> tag doesn't have a corresponding ending tag that

                 it also is closed with the extra space and slash, too.

           4. Nesting must be correct (and symmetrical). HTML also requires correct

                 nesting, but it wasn't always as problematic in browsers. XHTML requires it

                 done properly, though. For example, this is incorrect:

                 <p><strong>Text</p></strong>


                 This is correct:

                 <p><strong>Text</strong></p>

           5. An ampersand (&) within an attribute value must use its character entity

                 reference. For example, a URL like this:


                 <a href="http://www.foo.com/cgi-bin/

http://websitetips.com/articles/xhtml/basics/ (2 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com



                 class.pl?saturday&night&live">foo</a>


                 must instead be:


                 <a href="http://www.foo.com/cgi-bin/

                 class.pl?saturday&amp;night&amp;live">foo</a>

           6. Your markup must be well-formed. If you've already been writing good

                 markup that validates with W3C, it's no big deal. If not, it's a good time to

                 clean up your markup.



 A New DTD

 In addition to the above is a new DTD, too. The sample below is for XHTML 1.0

 transitional.




            <?xml version="1.0" encoding="UTF-8"?>

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

            "http://www.w3.org/TR/xhtml1/DTD/

            xhtml1-transitional.dtd">

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



 The first line, beginning with <?xml version= ..., is the xml prolog, and it's

 recommended but not required. Note that using the xml prolog will trigger IE6 Quirks

 Mode, so you might want to leave it out or learn more about it before deciding. The



http://websitetips.com/articles/xhtml/basics/ (3 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com
 xml prolog tells the browser that your document is based upon a DTD using XML, and

 that it's using a standard character encoding.


 The second line, beginning with <!DOCTYPE ....>, will look more familiar to you, this

 time representing XHTML 1.0 transitional.


 Then, the last line beginning with <html xmlns=" ....> replaces the <html>

 element, telling the browser the language and the namespace.


 Below is a sample XHTML document. Note that all the markup is in lowercase, there

 are quotes around the attribute values, the new endings for the tags that don't have

 corresponding ending tags, and it is all well formed.



 A Sample XHTML Document


            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <title>Nifty New XHTML document</title>

            <meta name="description" content="This is the coolest XHTML document
            on the Internet." />

            <link rel="stylesheet" type="text/css" href="stylesheet.css" />

            </head>

            <body>

            <p>Content here.</p>
            <p>Content here.</p>



http://websitetips.com/articles/xhtml/basics/ (4 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com

            <ol>
               <li>List item one</li>
               <li>List item two</li>
            </ol>


            <dl>
               <dt>Term</dt>
               <dd>definition</dd>
            </dl>


            <img src="image.gif" height="150" width="40" alt="funny face" />

            <br/>

            <table class="data">
            <tr><td>Green eggs</td><td>Ham</td></tr>
            </table>



            <form method="get" action="foo">

            <select name="">
            <option value="all">All Products</option>
            <option value="books">Books</option>
            </select>

            <input type="text" name="keyword" size="10"
            value="" />

            <input type="submit" name="Search" value="Go!" />

            </form>


            </body>
            </html>




 Resources




http://websitetips.com/articles/xhtml/basics/ (5 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com




                                        To learn lots more about XHTML, check out WebsiteTips.com's
 XHTML section for annotated links to W3C recommendations, articles and tips, sites

 devoted to XHTML, and more.


 Also highly recommended is Molly Holzschlag's book, XML, HTML, XHTML Magic

 published by New Riders.



         This tutorial was originally published December 09, 2001 at Brainstorms and Raves.



         Copyright © 2001 Shirley E. Kaiser, M.A. All Rights Reserved. Reprint with permission only.

         Please contact the author for details.




                                               Today is March 20, 2006 - PST
                                Copyright © 1996-2006 WebsiteTips.com. All rights reserved.
                                           Created and maintained by SKDesigns.


                                      http://websitetips.com/articles/xhtml/basics/
                                      Last modified March 20, 2006 - 7:16pm PST




http://websitetips.com/articles/xhtml/basics/ (6 of 6)3/20/2006 11:32:47 AM

More Related Content

What's hot

Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1Mudasir Syed
 
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
 
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
 
Html beginner
Html beginnerHtml beginner
Html beginnerwihrbt
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5Manav Prasad
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workAlbino Tonnina
 

What's hot (20)

HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
 
Xhtml
XhtmlXhtml
Xhtml
 
Xhtml
XhtmlXhtml
Xhtml
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
 
Dhtml
DhtmlDhtml
Dhtml
 
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
 
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
 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Xhtml
XhtmlXhtml
Xhtml
 
Html beginner
Html beginnerHtml beginner
Html beginner
 
Xhtml
XhtmlXhtml
Xhtml
 
HTML & XHTML Basics
HTML & XHTML BasicsHTML & XHTML Basics
HTML & XHTML Basics
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Html
HtmlHtml
Html
 
1. HTML
1. HTML1. HTML
1. HTML
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers work
 

Similar to xhtml_basics

Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3Usman Mehmood
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyshabab shihan
 
A Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongA Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongNick Armstrong
 
Web technologies: Lesson 2
Web technologies: Lesson 2Web technologies: Lesson 2
Web technologies: Lesson 2nhepner
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorialnikhilsh66131
 
WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)Tyler Sticka
 
2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School StyleRussell Castagnaro
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1Shawn Calvert
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateDaniel Downs
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracketjnewmanux
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Aslam Najeebdeen
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)Coder Tech
 

Similar to xhtml_basics (20)

Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 
More On Html 5
More On Html 5More On Html 5
More On Html 5
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
A Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongA Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick Armstrong
 
Web technologies: Lesson 2
Web technologies: Lesson 2Web technologies: Lesson 2
Web technologies: Lesson 2
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Xml
XmlXml
Xml
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)
 
2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
 
Day1
Day1Day1
Day1
 

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
 
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

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

xhtml_basics

  • 1. Fast and Easy XHTML - XHTML Tutorial, By Shirley E. Kaiser, M.A., SKDesigns - Website Tips at Websitetips.com December, 2001, Updated March 2006 Copyright © 2001-2006, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved. Wondering how to turn your HTML markup into XHTML? Here are a few quick tips to teach you the very basics, a sample XHTML document, and resources for more information. If you already know HTML, I suspect you can learn how to implement these markup changes within a couple of hours. If you just dig in and give it a try, I think you'll be pleasantly surprised to see that it's easier than you may have thought. Ready to give it a try? Let's go.... The Basics http://websitetips.com/articles/xhtml/basics/ (1 of 6)3/20/2006 11:32:47 AM
  • 2. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com 1. All your markup needs to be in lowercase. For example, instead of <P></P> it needs to be <p></p> for XHTML. 2. Every tag must have a corresponding ending tag, such as <p></p> and <li></li>. Some tags don't have a corresponding ending tag, such as <br>, <hr>, and others. Those tags, to be backward compatible will look like this instead: <br /> <hr /> (Below is an XHTML document sample that shows more of these.) 3. Every attribute value must be in double quotes, such as: <img src="image.gif" height="150" width="40" alt="funny face" /> Notice that since the <img> tag doesn't have a corresponding ending tag that it also is closed with the extra space and slash, too. 4. Nesting must be correct (and symmetrical). HTML also requires correct nesting, but it wasn't always as problematic in browsers. XHTML requires it done properly, though. For example, this is incorrect: <p><strong>Text</p></strong> This is correct: <p><strong>Text</strong></p> 5. An ampersand (&) within an attribute value must use its character entity reference. For example, a URL like this: <a href="http://www.foo.com/cgi-bin/ http://websitetips.com/articles/xhtml/basics/ (2 of 6)3/20/2006 11:32:47 AM
  • 3. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com class.pl?saturday&night&live">foo</a> must instead be: <a href="http://www.foo.com/cgi-bin/ class.pl?saturday&amp;night&amp;live">foo</a> 6. Your markup must be well-formed. If you've already been writing good markup that validates with W3C, it's no big deal. If not, it's a good time to clean up your markup. A New DTD In addition to the above is a new DTD, too. The sample below is for XHTML 1.0 transitional. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> The first line, beginning with <?xml version= ..., is the xml prolog, and it's recommended but not required. Note that using the xml prolog will trigger IE6 Quirks Mode, so you might want to leave it out or learn more about it before deciding. The http://websitetips.com/articles/xhtml/basics/ (3 of 6)3/20/2006 11:32:47 AM
  • 4. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com xml prolog tells the browser that your document is based upon a DTD using XML, and that it's using a standard character encoding. The second line, beginning with <!DOCTYPE ....>, will look more familiar to you, this time representing XHTML 1.0 transitional. Then, the last line beginning with <html xmlns=" ....> replaces the <html> element, telling the browser the language and the namespace. Below is a sample XHTML document. Note that all the markup is in lowercase, there are quotes around the attribute values, the new endings for the tags that don't have corresponding ending tags, and it is all well formed. A Sample XHTML Document <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Nifty New XHTML document</title> <meta name="description" content="This is the coolest XHTML document on the Internet." /> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> </head> <body> <p>Content here.</p> <p>Content here.</p> http://websitetips.com/articles/xhtml/basics/ (4 of 6)3/20/2006 11:32:47 AM
  • 5. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com <ol> <li>List item one</li> <li>List item two</li> </ol> <dl> <dt>Term</dt> <dd>definition</dd> </dl> <img src="image.gif" height="150" width="40" alt="funny face" /> <br/> <table class="data"> <tr><td>Green eggs</td><td>Ham</td></tr> </table> <form method="get" action="foo"> <select name=""> <option value="all">All Products</option> <option value="books">Books</option> </select> <input type="text" name="keyword" size="10" value="" /> <input type="submit" name="Search" value="Go!" /> </form> </body> </html> Resources http://websitetips.com/articles/xhtml/basics/ (5 of 6)3/20/2006 11:32:47 AM
  • 6. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com To learn lots more about XHTML, check out WebsiteTips.com's XHTML section for annotated links to W3C recommendations, articles and tips, sites devoted to XHTML, and more. Also highly recommended is Molly Holzschlag's book, XML, HTML, XHTML Magic published by New Riders. This tutorial was originally published December 09, 2001 at Brainstorms and Raves. Copyright © 2001 Shirley E. Kaiser, M.A. All Rights Reserved. Reprint with permission only. Please contact the author for details. Today is March 20, 2006 - PST Copyright © 1996-2006 WebsiteTips.com. All rights reserved. Created and maintained by SKDesigns. http://websitetips.com/articles/xhtml/basics/ Last modified March 20, 2006 - 7:16pm PST http://websitetips.com/articles/xhtml/basics/ (6 of 6)3/20/2006 11:32:47 AM