SlideShare uma empresa Scribd logo
1 de 13
A Reformulation of HTML 4 in XML 1.0
(Yes, I am a nerd)
XHTML
 What is it?
 Why use it?
 How do I use it correctly?
What is XHTML?
 Extensible HyperText Markup
Language
 Combination of HTML and XML
 The elements from HTML
 The syntax from XML
Why should I care?
 Based on industry standards
 Cross browser support
 Validated and proper code
 Will run properly on all XML devices
Basic Structure
 One root element per document
 Properly nested elements
 Closed elements
 lowercase elements
 More syntax
One root element
 The basic mandatory structure
<!DOCTYPE – more in a second>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
Properly Nested
 BAD
<p>
This
<strong><em>
is</strong></em>
fun.
</p>
 HAPPY FUN TIME
<p>
This
<strong><em>
is
</em></strong>
fun.
</p>
Closed Elements
 BAD
<p>Paragraph 1
<p>Paragraph 2
<br>
<hr>
<img src=“pic.jpg”>
 HAPPY FUN TIME
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<br />
<hr />
<img src=“pic.jpg” />
lowercase elements
 BAD
<P> another
paragraph
with an image
<Img Src=“pic.jpg” />
</p>
 HAPPY FUN TIME
<p> another
paragraph
with an image
<img src=“pic.jpg” />
</p>
 HAPPY FUN TIME
<table width=“100%”>
</table>
<input checked=“checked” />
<option selected=“selected”>
</option>
 BAD
<table WIDTH=100%>
</table>
<input checked>
<option SELECTED>
</option>
More syntax
 Attribute names must be lowercase, their
values quoted, and no “minimization”
DOCTYPE
 Only really have to worry about this if
you create the page from scratch
 Don’t really worry about what
everything means except for…
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/
xhtml1-transitional.dtd">
Now What?
 XHTML Cheat Sheet v1.03 -
http://floele.flyspray.org/htmlcheatsheet.pdf
 Official HTML 4 page –
http://www.w3.org/TR/html4/
 Official list of elements (HTML 4) -
http://www.w3.org/TR/html4/index/elements.html
 Official list of attributes (HTML 4) -
http://www.w3.org/TR/html4/index/attributes.html
 Official XHTML 1 page –
http://www.w3.org/TR/xhtml1/
Who am I?
 C. Todd Barber
 Webmaster
 University of Tennessee Health Science Center
 Memphis, TN 38163
 http://www.utmem.edu
 Also at
 http://ctbarber.com
 http://twitter.com/ctbarber

Mais conteúdo relacionado

Mais procurados

Building A Website
Building A WebsiteBuilding A Website
Building A Website
marabeas
 

Mais procurados (19)

Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Xhtml
XhtmlXhtml
Xhtml
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Html
HtmlHtml
Html
 
Learning HTML
Learning HTMLLearning HTML
Learning HTML
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Learning Html
Learning HtmlLearning Html
Learning Html
 
Html5 structure tags
Html5 structure tagsHtml5 structure tags
Html5 structure tags
 
Html1
Html1Html1
Html1
 
Common html
Common htmlCommon html
Common html
 
Introduction To HTML
Introduction To HTMLIntroduction To HTML
Introduction To HTML
 
SEO Mistakes
SEO MistakesSEO Mistakes
SEO Mistakes
 
Building A Website
Building A WebsiteBuilding A Website
Building A Website
 
PHP Code And Search Engine Optimation
PHP Code And Search Engine OptimationPHP Code And Search Engine Optimation
PHP Code And Search Engine Optimation
 
Intro to HTML (Kid's Class at TIY)
Intro to HTML (Kid's Class at TIY)Intro to HTML (Kid's Class at TIY)
Intro to HTML (Kid's Class at TIY)
 
Getting into HTML
Getting into HTMLGetting into HTML
Getting into HTML
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
HTML Introduction, HTML History, HTML Uses, HTML benifits
HTML Introduction, HTML History, HTML Uses, HTML benifitsHTML Introduction, HTML History, HTML Uses, HTML benifits
HTML Introduction, HTML History, HTML Uses, HTML benifits
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
 

Destaque (7)

Educational sites for summer help 2011
Educational sites for summer help 2011Educational sites for summer help 2011
Educational sites for summer help 2011
 
Portland seattle computer_sales
Portland seattle computer_salesPortland seattle computer_sales
Portland seattle computer_sales
 
Where radio-fits-1
Where radio-fits-1Where radio-fits-1
Where radio-fits-1
 
Felicitacion Navidad 2008-2009 FEP-USO
Felicitacion Navidad 2008-2009 FEP-USOFelicitacion Navidad 2008-2009 FEP-USO
Felicitacion Navidad 2008-2009 FEP-USO
 
Renasterea Vulturului
Renasterea VulturuluiRenasterea Vulturului
Renasterea Vulturului
 
Case Analysis Zlio 2008
Case Analysis   Zlio 2008Case Analysis   Zlio 2008
Case Analysis Zlio 2008
 
Radio Ads Reach Receptivity - A Smarter Mix 2013
Radio Ads Reach Receptivity - A Smarter Mix 2013 Radio Ads Reach Receptivity - A Smarter Mix 2013
Radio Ads Reach Receptivity - A Smarter Mix 2013
 

Semelhante a XHTML basics

Chapter 6 html
Chapter 6 htmlChapter 6 html
Chapter 6 html
home
 

Semelhante a XHTML basics (20)

Summary of-xhtml-basics
Summary of-xhtml-basicsSummary of-xhtml-basics
Summary of-xhtml-basics
 
HTML.ppt
HTML.pptHTML.ppt
HTML.ppt
 
Xhtml
XhtmlXhtml
Xhtml
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
A109 base code html
A109 base code   htmlA109 base code   html
A109 base code html
 
Using HTML5 sensibly
Using HTML5 sensiblyUsing HTML5 sensibly
Using HTML5 sensibly
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Advance HTML
Advance HTMLAdvance HTML
Advance HTML
 
Html
HtmlHtml
Html
 
HTML guide for beginners
HTML guide for beginnersHTML guide for beginners
HTML guide for beginners
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
 
Html.docx
Html.docxHtml.docx
Html.docx
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
 
html.pdf
html.pdfhtml.pdf
html.pdf
 
Html basics
Html basicsHtml basics
Html basics
 
#1 HTML [know-how]
#1 HTML [know-how]#1 HTML [know-how]
#1 HTML [know-how]
 
Web Designing.docx
Web Designing.docxWeb Designing.docx
Web Designing.docx
 
Chapter 6 html
Chapter 6 htmlChapter 6 html
Chapter 6 html
 
More On Html 5
More On Html 5More On Html 5
More On Html 5
 
Kick start @ html5
Kick start @ html5Kick start @ html5
Kick start @ html5
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

XHTML basics

  • 1. A Reformulation of HTML 4 in XML 1.0 (Yes, I am a nerd)
  • 2. XHTML  What is it?  Why use it?  How do I use it correctly?
  • 3. What is XHTML?  Extensible HyperText Markup Language  Combination of HTML and XML  The elements from HTML  The syntax from XML
  • 4. Why should I care?  Based on industry standards  Cross browser support  Validated and proper code  Will run properly on all XML devices
  • 5. Basic Structure  One root element per document  Properly nested elements  Closed elements  lowercase elements  More syntax
  • 6. One root element  The basic mandatory structure <!DOCTYPE – more in a second> <html> <head> <title></title> </head> <body> </body> </html>
  • 7. Properly Nested  BAD <p> This <strong><em> is</strong></em> fun. </p>  HAPPY FUN TIME <p> This <strong><em> is </em></strong> fun. </p>
  • 8. Closed Elements  BAD <p>Paragraph 1 <p>Paragraph 2 <br> <hr> <img src=“pic.jpg”>  HAPPY FUN TIME <p>Paragraph 1</p> <p>Paragraph 2</p> <br /> <hr /> <img src=“pic.jpg” />
  • 9. lowercase elements  BAD <P> another paragraph with an image <Img Src=“pic.jpg” /> </p>  HAPPY FUN TIME <p> another paragraph with an image <img src=“pic.jpg” /> </p>
  • 10.  HAPPY FUN TIME <table width=“100%”> </table> <input checked=“checked” /> <option selected=“selected”> </option>  BAD <table WIDTH=100%> </table> <input checked> <option SELECTED> </option> More syntax  Attribute names must be lowercase, their values quoted, and no “minimization”
  • 11. DOCTYPE  Only really have to worry about this if you create the page from scratch  Don’t really worry about what everything means except for… <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd">
  • 12. Now What?  XHTML Cheat Sheet v1.03 - http://floele.flyspray.org/htmlcheatsheet.pdf  Official HTML 4 page – http://www.w3.org/TR/html4/  Official list of elements (HTML 4) - http://www.w3.org/TR/html4/index/elements.html  Official list of attributes (HTML 4) - http://www.w3.org/TR/html4/index/attributes.html  Official XHTML 1 page – http://www.w3.org/TR/xhtml1/
  • 13. Who am I?  C. Todd Barber  Webmaster  University of Tennessee Health Science Center  Memphis, TN 38163  http://www.utmem.edu  Also at  http://ctbarber.com  http://twitter.com/ctbarber