SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
Jan 24, 2016
XHTML
http://www.w3schools.com/xhtml/
2
What is XHTML?
 XHTML stands for Extensible Hypertext Markup
Language
 XHTML is aimed to replace HTML
 XHTML is almost identical to HTML 4.01
 XHTML is a stricter and cleaner version of HTML
 XML (Extensible Markup Language) is a markup
language designed for describing data
 XHTML is HTML redefined as an XML application
 XHTML is a “bridge” between HTML and XML
3
The problem with HTML
 HTML started out as a way of way of describing the
structure of documents, with tags to indicate headers,
paragraphs, and the like
 Because people wanted to control the appearance of
documents, HTML acquired tags to control fonts,
alignment, etc.
 The result is a markup language that does both, but isn’t
very good at either
4
HTML vs. XML
XML looks a lot like HTML, but--
HTML uses a fixed set of
tags
With XML you make up your
own tags (and define what they
mean in a separate document)
HTML is designed to
display data to humans
XML is designed to describe
data to computers
Browsers are very tolerant
of errors in HTML
XML documents must be well-
formed (syntactically correct)
All browsers can display
HTML
Most modern browsers can
display XML
5
From HTML to XHTML, I
 XHTML elements must be properly nested
<b><i>bold and italic</b></i> is wrong
 XHTML documents must be well-formed
<html>
<head> ... </head>
<body> ... </body>
</html>
 Tag names must be in lowercase
 All XHTML elements must be closed
 If an HTML tag is not a container, close it like this:
<br />, <hr />, <image src="smile.gif" />
 Note: Some browsers require a space before the /
6
From HTML to XHTML, II
 Attribute names must also be in lower case
 Example: <table width="100%">
 Attribute values must be quoted
 Example: <table width="100%">
 Attribute minimization is forbidden
 Example: <frame noresize="noresize">,
cannot be abbreviated to <frame noresize>
 The id attribute replaces the name attribute
 Wrong: <img src="picture.gif" name="picture1" />
 Right: <img src="picture.gif" id="picture1" />
 Best: <img src="picture.gif" name="picture1" id="picture1" />
7
SGML and DTDs
 SGML stands for “Standard Generalized Markup Language”
 HTML, XHTML, XML and many other markup languages are
defined in SGML
 A DTD, or “Document Type Definition” describes the syntax to
use for the current document
 There are three different DTDs for XHTML--you can pick the
one you want
 These DTDs are public and on the web
 You must start your XHTML document with a reference to one of these
DTDs
8
DOCTYPE declaration, I
 Every XHTML document must begin with one
of the DOCTYPE declarations (DTDs):
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
9
DOCTYPE declaration, II
 The three main DTDs are as follows:
 Strict

Use for really clean markup, with no display
information (no font, color, or size information)

Use with CSS (Cascading Style Sheets) if you want
to define how the document should look
 Transitional

Use with standard HTML and/or with CSS

Allows deprecated HTML elements
 Frameset

Use if your document uses HTML frames
10
An XHTML Example
 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>A simple document</title>
</head>
<body>
<p>A simple paragraph.</p>
</body>
</html>
11
Tools
 Dave Raggett's HTML TIDY
http://www.w3.org/People/Raggett/tidy/
is a free UNIX tool for checking and cleaning up HTML
pages
 W3C HTML Validation Tool
http://validator.w3.org/ is an HTML form for checking
(but not fixing) HTML and XHTML documents
12
Vocabulary
 SGML: Standard Generalized Markup Language
 HTML: Hypertext Markup Language
 XHTML: eXtensible Hypertext Markup Language
 XML: eXtensible Markup Language
 DTD: Document Type Definition
13
The End

More Related Content

What's hot (20)

PPTX
Css selectors
Parth Trivedi
 
PPTX
How to learn HTML in 10 Days
Manoj kumar Deswal
 
PPTX
Anchor tag HTML Presentation
Nimish Gupta
 
PPTX
Html forms
Himanshu Pathak
 
PPTX
HTML
chinesebilli
 
PPTX
HTML Forms
Ravinder Kamboj
 
PPT
Introduction to html
vikasgaur31
 
PPT
Presentation on HTML
satvirsandhu9
 
PPT
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
PPTX
Sgml
rahul kundu
 
PPTX
Java script
Shyam Khant
 
PPTX
1 03 - CSS Introduction
apnwebdev
 
PPT
Html Ppt
vijayanit
 
PPTX
Cascading Style Sheet (CSS)
AakankshaR
 
PPTX
Html ppt
santosh lamba
 
PPTX
Html images syntax
JayjZens
 
PPTX
Xml ppt
seemadav1
 
Css selectors
Parth Trivedi
 
How to learn HTML in 10 Days
Manoj kumar Deswal
 
Anchor tag HTML Presentation
Nimish Gupta
 
Html forms
Himanshu Pathak
 
HTML Forms
Ravinder Kamboj
 
Introduction to html
vikasgaur31
 
Presentation on HTML
satvirsandhu9
 
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
Java script
Shyam Khant
 
1 03 - CSS Introduction
apnwebdev
 
Html Ppt
vijayanit
 
Cascading Style Sheet (CSS)
AakankshaR
 
Html ppt
santosh lamba
 
Html images syntax
JayjZens
 
Xml ppt
seemadav1
 

Viewers also liked (20)

PPTX
Perl
Ahmed Hmed
 
PDF
Design Patterns: Defining and Sharing Web Design Languages
Luke Wroblewski
 
PDF
Html sinhala(By Prasanga Amila-UCSC)
Prasanga Amila Balasooriya
 
PPT
Introduzione ai css
gianlucatroiani
 
PPTX
Client and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
DOCX
HTML Web design english & sinhala mix note
Mahinda Gamage
 
PDF
Css sinhala(By Prasanga Amila-UCSC)
Prasanga Amila Balasooriya
 
DOC
Web Design Notes
butest
 
PPS
Xhtml
Samir Sabry
 
PPTX
Beautiful Web Design
Abdel Moneim Emad
 
PPTX
Client side and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
PDF
Client side scripting
Eleonora Ciceri
 
PPTX
Dhtml
rahul kundu
 
PPTX
Dhtml
Sadhana28
 
PPTX
ASP, ASP.NET, JSP, COM/DCOM
Aashish Jain
 
PPTX
Website Design Issues
rakudepp
 
PPSX
multimedia and computer graphics
deepthianna
 
PDF
Use of colors in web and graphic design
Nida Aslam
 
Design Patterns: Defining and Sharing Web Design Languages
Luke Wroblewski
 
Html sinhala(By Prasanga Amila-UCSC)
Prasanga Amila Balasooriya
 
Introduzione ai css
gianlucatroiani
 
Client and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
HTML Web design english & sinhala mix note
Mahinda Gamage
 
Css sinhala(By Prasanga Amila-UCSC)
Prasanga Amila Balasooriya
 
Web Design Notes
butest
 
Beautiful Web Design
Abdel Moneim Emad
 
Client side and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
Client side scripting
Eleonora Ciceri
 
Dhtml
Sadhana28
 
ASP, ASP.NET, JSP, COM/DCOM
Aashish Jain
 
Website Design Issues
rakudepp
 
multimedia and computer graphics
deepthianna
 
Use of colors in web and graphic design
Nida Aslam
 
Ad

Similar to Xhtml (20)

PPSX
Xhtml
Veena Gadad
 
PPTX
Xhtml
sana mateen
 
PPT
Lecture07 ASDFASFA ASD ASD SDS XHTML.ppt
DrKBManwade
 
PPTX
Lecture 4 - Adding XTHML for the Web
phanleson
 
PPTX
Xml For Dummies Chapter 4 Adding Xhtml For The Web
phanleson
 
PPT
4_Traditional html vs xhtml.ppt
VARNITBHASKAR1
 
PPTX
Html vs xhtml
Yastee Shah
 
PPTX
Lecture-1.pptx
vishal choudhary
 
PPTX
IS221__Week1_Lecture chapter one, Web design.pptx
kumaranikethnavish
 
PDF
xhtml-documentation
tutorialsruby
 
PDF
xhtml-documentation
tutorialsruby
 
PPSX
Xhtml
Shajed Talukder
 
PPTX
The Difference between HTML, XHTML & HTML5 for Beginners
Rasin Bekkevold
 
DOCX
Xhtml
pragashny
 
PPTX
BITM3730 10-18.pptx
MattMarino13
 
PPTX
BITM3730 10-31.pptx
MattMarino13
 
PPT
1-Basic HTML.ppt
kavi806657
 
PPT
1-Basic HTML.ppt
kavi806657
 
PPT
Intr to-html-xhtml-1233508169541646-3
bluejayjunior
 
Lecture07 ASDFASFA ASD ASD SDS XHTML.ppt
DrKBManwade
 
Lecture 4 - Adding XTHML for the Web
phanleson
 
Xml For Dummies Chapter 4 Adding Xhtml For The Web
phanleson
 
4_Traditional html vs xhtml.ppt
VARNITBHASKAR1
 
Html vs xhtml
Yastee Shah
 
Lecture-1.pptx
vishal choudhary
 
IS221__Week1_Lecture chapter one, Web design.pptx
kumaranikethnavish
 
xhtml-documentation
tutorialsruby
 
xhtml-documentation
tutorialsruby
 
The Difference between HTML, XHTML & HTML5 for Beginners
Rasin Bekkevold
 
Xhtml
pragashny
 
BITM3730 10-18.pptx
MattMarino13
 
BITM3730 10-31.pptx
MattMarino13
 
1-Basic HTML.ppt
kavi806657
 
1-Basic HTML.ppt
kavi806657
 
Intr to-html-xhtml-1233508169541646-3
bluejayjunior
 
Ad

More from Manav Prasad (20)

PPTX
Experience with mulesoft
Manav Prasad
 
PPTX
Mulesoftconnectors
Manav Prasad
 
PPT
Mule and web services
Manav Prasad
 
PPTX
Mulesoft cloudhub
Manav Prasad
 
PPT
Perl tutorial
Manav Prasad
 
PPT
Hibernate presentation
Manav Prasad
 
PPT
Jpa
Manav Prasad
 
PPT
Spring introduction
Manav Prasad
 
PPT
Json
Manav Prasad
 
PPT
The spring framework
Manav Prasad
 
PPT
Rest introduction
Manav Prasad
 
PPT
Exceptions in java
Manav Prasad
 
PPT
Junit
Manav Prasad
 
PPT
Xml parsers
Manav Prasad
 
PPT
Xpath
Manav Prasad
 
PPT
Xslt
Manav Prasad
 
PPT
Css
Manav Prasad
 
PPT
Introduction to html5
Manav Prasad
 
PPT
Ajax
Manav Prasad
 
PPT
J query
Manav Prasad
 
Experience with mulesoft
Manav Prasad
 
Mulesoftconnectors
Manav Prasad
 
Mule and web services
Manav Prasad
 
Mulesoft cloudhub
Manav Prasad
 
Perl tutorial
Manav Prasad
 
Hibernate presentation
Manav Prasad
 
Spring introduction
Manav Prasad
 
The spring framework
Manav Prasad
 
Rest introduction
Manav Prasad
 
Exceptions in java
Manav Prasad
 
Xml parsers
Manav Prasad
 
Introduction to html5
Manav Prasad
 
J query
Manav Prasad
 

Recently uploaded (20)

PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
PCU Keynote at IEEE World Congress on Services 250710.pptx
Ramesh Jain
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PPTX
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
PDF
Basics of Electronics for IOT(actuators ,microcontroller etc..)
arnavmanesh
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
PCU Keynote at IEEE World Congress on Services 250710.pptx
Ramesh Jain
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
Basics of Electronics for IOT(actuators ,microcontroller etc..)
arnavmanesh
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
The Future of Artificial Intelligence (AI)
Mukul
 
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 

Xhtml

  • 2. 2 What is XHTML?  XHTML stands for Extensible Hypertext Markup Language  XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XML (Extensible Markup Language) is a markup language designed for describing data  XHTML is HTML redefined as an XML application  XHTML is a “bridge” between HTML and XML
  • 3. 3 The problem with HTML  HTML started out as a way of way of describing the structure of documents, with tags to indicate headers, paragraphs, and the like  Because people wanted to control the appearance of documents, HTML acquired tags to control fonts, alignment, etc.  The result is a markup language that does both, but isn’t very good at either
  • 4. 4 HTML vs. XML XML looks a lot like HTML, but-- HTML uses a fixed set of tags With XML you make up your own tags (and define what they mean in a separate document) HTML is designed to display data to humans XML is designed to describe data to computers Browsers are very tolerant of errors in HTML XML documents must be well- formed (syntactically correct) All browsers can display HTML Most modern browsers can display XML
  • 5. 5 From HTML to XHTML, I  XHTML elements must be properly nested <b><i>bold and italic</b></i> is wrong  XHTML documents must be well-formed <html> <head> ... </head> <body> ... </body> </html>  Tag names must be in lowercase  All XHTML elements must be closed  If an HTML tag is not a container, close it like this: <br />, <hr />, <image src="smile.gif" />  Note: Some browsers require a space before the /
  • 6. 6 From HTML to XHTML, II  Attribute names must also be in lower case  Example: <table width="100%">  Attribute values must be quoted  Example: <table width="100%">  Attribute minimization is forbidden  Example: <frame noresize="noresize">, cannot be abbreviated to <frame noresize>  The id attribute replaces the name attribute  Wrong: <img src="picture.gif" name="picture1" />  Right: <img src="picture.gif" id="picture1" />  Best: <img src="picture.gif" name="picture1" id="picture1" />
  • 7. 7 SGML and DTDs  SGML stands for “Standard Generalized Markup Language”  HTML, XHTML, XML and many other markup languages are defined in SGML  A DTD, or “Document Type Definition” describes the syntax to use for the current document  There are three different DTDs for XHTML--you can pick the one you want  These DTDs are public and on the web  You must start your XHTML document with a reference to one of these DTDs
  • 8. 8 DOCTYPE declaration, I  Every XHTML document must begin with one of the DOCTYPE declarations (DTDs):  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  • 9. 9 DOCTYPE declaration, II  The three main DTDs are as follows:  Strict  Use for really clean markup, with no display information (no font, color, or size information)  Use with CSS (Cascading Style Sheets) if you want to define how the document should look  Transitional  Use with standard HTML and/or with CSS  Allows deprecated HTML elements  Frameset  Use if your document uses HTML frames
  • 10. 10 An XHTML Example  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>A simple document</title> </head> <body> <p>A simple paragraph.</p> </body> </html>
  • 11. 11 Tools  Dave Raggett's HTML TIDY http://www.w3.org/People/Raggett/tidy/ is a free UNIX tool for checking and cleaning up HTML pages  W3C HTML Validation Tool http://validator.w3.org/ is an HTML form for checking (but not fixing) HTML and XHTML documents
  • 12. 12 Vocabulary  SGML: Standard Generalized Markup Language  HTML: Hypertext Markup Language  XHTML: eXtensible Hypertext Markup Language  XML: eXtensible Markup Language  DTD: Document Type Definition