SlideShare a Scribd company logo
1 of 13
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

What's hot (20)

Web designing using html
Web designing using htmlWeb designing using html
Web designing using html
 
Javascript
JavascriptJavascript
Javascript
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Html Basic Tags
Html Basic TagsHtml Basic Tags
Html Basic Tags
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Xhtml
XhtmlXhtml
Xhtml
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Css selectors
Css selectorsCss selectors
Css selectors
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Html form tag
Html form tagHtml form tag
Html form tag
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Dom
DomDom
Dom
 
Sgml
SgmlSgml
Sgml
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Html ppt
Html pptHtml ppt
Html ppt
 

Viewers also liked (20)

Perl
PerlPerl
Perl
 
Design Patterns: Defining and Sharing Web Design Languages
Design Patterns: Defining and Sharing Web Design Languages Design Patterns: Defining and Sharing Web Design Languages
Design Patterns: Defining and Sharing Web Design Languages
 
XHTML
XHTMLXHTML
XHTML
 
Html sinhala(By Prasanga Amila-UCSC)
Html sinhala(By Prasanga Amila-UCSC)Html sinhala(By Prasanga Amila-UCSC)
Html sinhala(By Prasanga Amila-UCSC)
 
Introduzione ai css
Introduzione ai cssIntroduzione ai css
Introduzione ai css
 
Client and server side scripting
Client and server side scriptingClient and server side scripting
Client and server side scripting
 
HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
 
Css sinhala(By Prasanga Amila-UCSC)
Css sinhala(By Prasanga Amila-UCSC)Css sinhala(By Prasanga Amila-UCSC)
Css sinhala(By Prasanga Amila-UCSC)
 
Intr To Html & Xhtml
Intr To Html & XhtmlIntr To Html & Xhtml
Intr To Html & Xhtml
 
Web Design Notes
Web Design NotesWeb Design Notes
Web Design Notes
 
Xhtml
XhtmlXhtml
Xhtml
 
Beautiful Web Design
Beautiful Web DesignBeautiful Web Design
Beautiful Web Design
 
Client side and server side scripting
Client side and server side scriptingClient side and server side scripting
Client side and server side scripting
 
Client side scripting
Client side scriptingClient side scripting
Client side scripting
 
CSS
CSSCSS
CSS
 
Dhtml
DhtmlDhtml
Dhtml
 
Dhtml
DhtmlDhtml
Dhtml
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOM
 
Website Design Issues
Website Design IssuesWebsite Design Issues
Website Design Issues
 
multimedia and computer graphics
multimedia and computer graphicsmultimedia and computer graphics
multimedia and computer graphics
 

Similar to Xhtml (20)

01 Xml Begin
01 Xml Begin01 Xml Begin
01 Xml Begin
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Web
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
Xml
XmlXml
Xml
 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
 
Web engineering notes unit 3
Web engineering notes unit 3Web engineering notes unit 3
Web engineering notes unit 3
 
eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
Xhtml
XhtmlXhtml
Xhtml
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1
 
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
 

More from Manav Prasad (20)

Experience with mulesoft
Experience with mulesoftExperience with mulesoft
Experience with mulesoft
 
Mulesoftconnectors
MulesoftconnectorsMulesoftconnectors
Mulesoftconnectors
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Mulesoft cloudhub
Mulesoft cloudhubMulesoft cloudhub
Mulesoft cloudhub
 
Perl tutorial
Perl tutorialPerl tutorial
Perl tutorial
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
 
Jpa
JpaJpa
Jpa
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Json
Json Json
Json
 
The spring framework
The spring frameworkThe spring framework
The spring framework
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
Exceptions in java
Exceptions in javaExceptions in java
Exceptions in java
 
Junit
JunitJunit
Junit
 
Xml parsers
Xml parsersXml parsers
Xml parsers
 
Xpath
XpathXpath
Xpath
 
Xslt
XsltXslt
Xslt
 
Css
CssCss
Css
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Ajax
AjaxAjax
Ajax
 
J query
J queryJ query
J query
 

Recently uploaded

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 

Recently uploaded (20)

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 

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