SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances (20)

Dom
DomDom
Dom
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Html
HtmlHtml
Html
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
DTD
DTDDTD
DTD
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Html basics
Html basicsHtml basics
Html basics
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
CSS selectors
CSS selectorsCSS selectors
CSS selectors
 
Css selectors
Css selectorsCss selectors
Css selectors
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
jQuery
jQueryjQuery
jQuery
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Class 3 - PHP Functions
Class 3 - PHP FunctionsClass 3 - PHP Functions
Class 3 - PHP Functions
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 

En vedette (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
 

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

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

Dernier

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Dernier (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

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