SlideShare a Scribd company logo
HTML vs XHTML
• XHTML 1.0 was created shortly after HTML 4.01 to help the transition
of hypertext to a new generation of mark-up languages for text.
• XHTML 1.1 is an additional step toward a more flexible version of
hypertext with the full benefits of XML architecture and integration of
different technologies.
• Note that XHTML 1.1 has slightly improved the semantics of HTML
4.01 by including the Ruby module, used in particular languages like
Japanese scripts.
What Is XHTML?
• XHTML stands for EXtensible HyperText Markup Language
• XHTML is almost identical to HTML
• XHTML is stricter than HTML
• XHTML is HTML defined as an XML application
• XHTML is supported by all major browsers
Why XHTML?
• Many pages on the internet contain "bad" HTML.
• This HTML code works fine in most browsers (even if it does not follow the
HTML rules):
<html>
<head>
<title>This is bad HTML</title>
<body>
<h1>Bad HTML
<p>This is a paragraph
</body>
• Today's market consists of different browser technologies.
• Some browsers run on computers, and some browsers run on mobile
phones or other small devices.
• XML is a markup language where documents must be marked up
correctly (be "well-formed").
• By combining the strengths of HTML and XML, XHTML was
developed.
• XHTML is HTML redesigned as XML.
The Most Important Differences from HTML:
• Document Structure
• XHTML Elements
• XHTML Attributes
Document Structure
• XHTML DOCTYPE is mandatory
• The xmlns attribute in <html> is mandatory
• <html>, <head>, <title>, and <body> are mandatory
XHTML Elements
• XHTML elements must be properly nested
• XHTML elements must always be closed
• XHTML elements must be in lowercase
• XHTML documents must have one root element
• XHTML Attributes
XHTML Attributes
• Attribute names must be in lower case
• Attribute values must be quoted
• Attribute minimization is forbidden
HTML doc structure
XHTML doc structure
<!DOCTYPE ....> Is Mandatory
• An XHTML document must have an XHTML DOCTYPE declaration.
• The <html>, <head>, <title>, and <body> elements must also be
present, and the xmlns attribute in <html> must specify the xml
namespace for the document.
• This example shows an XHTML document with a minimum of
required tags:
4_Traditional html vs xhtml.ppt
XHTML Elements Must Be Properly Nested
4_Traditional html vs xhtml.ppt
4_Traditional html vs xhtml.ppt
4_Traditional html vs xhtml.ppt
4_Traditional html vs xhtml.ppt
4_Traditional html vs xhtml.ppt
4_Traditional html vs xhtml.ppt
4_Traditional html vs xhtml.ppt

More Related Content

PPTX
Html vs xhtml
PPTX
PPTX
HTML.pptx
PPTX
Lecture 4 - Adding XTHML for the Web
PPSX
PPTX
BITM3730 10-31.pptx
PPTX
BITM3730 10-18.pptx
PPTX
HTML basic tags and description PPT slides
Html vs xhtml
HTML.pptx
Lecture 4 - Adding XTHML for the Web
BITM3730 10-31.pptx
BITM3730 10-18.pptx
HTML basic tags and description PPT slides

Similar to 4_Traditional html vs xhtml.ppt (20)

PPTX
uptu web technology unit 2 html
PDF
www.webre24h.com - [O`reilly] html and xhtml. pocket reference, 4th ed. - [...
PDF
HTML stands for HyperText Markup Language. It is used to design web pages usi...
PPTX
Xml For Dummies Chapter 4 Adding Xhtml For The Web
PDF
PSK TECHNOLOGIES (1) (1) (1).pdf
PPTX
Html (hypertext markup language)
PPS
PDF
Oreilly -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
PDF
Unit 4 - HTTP and the Web Services - IT
PPT
Introduction to html
PPT
1. html introduction
PPTX
Introdution to HTML
PPTX
Grade 7_HTML.pptx
PPT
Web forms and html (lect 1)
PPTX
HTML doc introduction and basics ppt.pptx
PPTX
Html5
uptu web technology unit 2 html
www.webre24h.com - [O`reilly] html and xhtml. pocket reference, 4th ed. - [...
HTML stands for HyperText Markup Language. It is used to design web pages usi...
Xml For Dummies Chapter 4 Adding Xhtml For The Web
PSK TECHNOLOGIES (1) (1) (1).pdf
Html (hypertext markup language)
Oreilly -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
Unit 4 - HTTP and the Web Services - IT
Introduction to html
1. html introduction
Introdution to HTML
Grade 7_HTML.pptx
Web forms and html (lect 1)
HTML doc introduction and basics ppt.pptx
Html5
Ad

Recently uploaded (20)

PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Presentation on HIE in infants and its manifestations
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Complications of Minimal Access Surgery at WLH
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
master seminar digital applications in india
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Cell Structure & Organelles in detailed.
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Classroom Observation Tools for Teachers
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Institutional Correction lecture only . . .
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Anesthesia in Laparoscopic Surgery in India
A systematic review of self-coping strategies used by university students to ...
Presentation on HIE in infants and its manifestations
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Complications of Minimal Access Surgery at WLH
human mycosis Human fungal infections are called human mycosis..pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O7-L3 Supply Chain Operations - ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
master seminar digital applications in india
Pharma ospi slides which help in ospi learning
Cell Structure & Organelles in detailed.
102 student loan defaulters named and shamed – Is someone you know on the list?
Classroom Observation Tools for Teachers
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Institutional Correction lecture only . . .
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Anesthesia in Laparoscopic Surgery in India
Ad

4_Traditional html vs xhtml.ppt

  • 2. • XHTML 1.0 was created shortly after HTML 4.01 to help the transition of hypertext to a new generation of mark-up languages for text. • XHTML 1.1 is an additional step toward a more flexible version of hypertext with the full benefits of XML architecture and integration of different technologies. • Note that XHTML 1.1 has slightly improved the semantics of HTML 4.01 by including the Ruby module, used in particular languages like Japanese scripts.
  • 3. What Is XHTML? • XHTML stands for EXtensible HyperText Markup Language • XHTML is almost identical to HTML • XHTML is stricter than HTML • XHTML is HTML defined as an XML application • XHTML is supported by all major browsers
  • 4. Why XHTML? • Many pages on the internet contain "bad" HTML. • This HTML code works fine in most browsers (even if it does not follow the HTML rules): <html> <head> <title>This is bad HTML</title> <body> <h1>Bad HTML <p>This is a paragraph </body>
  • 5. • Today's market consists of different browser technologies. • Some browsers run on computers, and some browsers run on mobile phones or other small devices. • XML is a markup language where documents must be marked up correctly (be "well-formed"). • By combining the strengths of HTML and XML, XHTML was developed. • XHTML is HTML redesigned as XML.
  • 6. The Most Important Differences from HTML: • Document Structure • XHTML Elements • XHTML Attributes
  • 7. Document Structure • XHTML DOCTYPE is mandatory • The xmlns attribute in <html> is mandatory • <html>, <head>, <title>, and <body> are mandatory
  • 8. XHTML Elements • XHTML elements must be properly nested • XHTML elements must always be closed • XHTML elements must be in lowercase • XHTML documents must have one root element • XHTML Attributes
  • 9. XHTML Attributes • Attribute names must be in lower case • Attribute values must be quoted • Attribute minimization is forbidden
  • 12. <!DOCTYPE ....> Is Mandatory • An XHTML document must have an XHTML DOCTYPE declaration. • The <html>, <head>, <title>, and <body> elements must also be present, and the xmlns attribute in <html> must specify the xml namespace for the document. • This example shows an XHTML document with a minimum of required tags:
  • 14. XHTML Elements Must Be Properly Nested