SlideShare a Scribd company logo
XHTML	
  1.0	
  	
  
Extensible	
  HyperText	
  Markup	
  Language	
  

               Jussi	
  Pohjolainen	
  
   Tampere	
  University	
  of	
  Applied	
  Sciences	
  
What	
  is	
  XHTML?	
  
•  XHTML™	
  1.0	
  The	
  Extensible	
  HyperText	
  Markup	
  
   Language	
  (Second	
  EdiKon)	
  
   –  hMp://www.w3.org/TR/xhtml1/	
  
•  XHTML	
  is	
  a	
  family	
  of	
  current	
  and	
  future	
  
   document	
  types	
  and	
  modules	
  that	
  reproduce,	
  
   subset,	
  and	
  extend	
  HTML	
  4	
  	
  
•  XHTML	
  family	
  document	
  types	
  are	
  XML	
  based	
  
Rules	
  
•  XHTML	
  document	
  must	
  follow	
  the	
  XML	
  –	
  rules	
  
   (wellformed)	
  
•  It	
  must	
  be	
  valid	
  against	
  one	
  of	
  three	
  DTDs	
  
     –  XHTML	
  Strict	
  
          •  Use	
  the	
  strict	
  DOCTYPE	
  when	
  you	
  want	
  really	
  clean	
  markup,	
  free	
  of	
  
             presentaKonal	
  cluMer.	
  Use	
  it	
  together	
  with	
  CSS.	
  
     –  XHTML	
  TransiKonal	
  
          •  Use	
  the	
  transiKonal	
  DOCTYPE	
  when	
  you	
  want	
  to	
  sKll	
  use	
  HTML's	
  
             presentaKonal	
  features.	
  
     –  XHTML	
  Frameset	
  
          •  Use	
  the	
  frameset	
  DOCTYPE	
  when	
  you	
  want	
  to	
  use	
  HTML	
  frames.	
  	
  
•  Root	
  element	
  must	
  be	
  html
     –  And	
  it	
  must	
  contain	
  xmlns	
  namespace	
  h7p://www.w3.org/
        1999/xhtml	
  
XHTML	
  Example	
  
<?xml version="1.0"?>!
<!DOCTYPE html !
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"!
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">!
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
  lang="en">!
  <head>!
    <title>Minimal XHTML 1.0 Document</title>!
  </head>!
  <body>!
    <p>This is a minimal <a href="http://www.w3.org/TR/
  xhtml1/">XHTML 1.0</a> !
    document.</p>!
  </body>!
</html>!
The	
  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">
Mandatory	
  XHTML	
  Elements	
  
<?xml version="1.0"?>!
<!DOCTYPE html !
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"!
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
  strict.dtd">!
<html xmlns="http://www.w3.org/1999/xhtml">!
  <head>!
    <title>Minimal XHTML 1.0 Document</title>!
  </head>!
  <body>!

</body>!
</html>!
Syntax:	
  Elements	
  
•  XHTML	
  elements	
  must	
  be	
  properly	
  nested	
  
   –  <b><i>hello</i></b>	
  
•  XHTML	
  elements	
  must	
  always	
  be	
  closed	
  
   –  <br/>	
  
•  XHTML	
  elements	
  must	
  be	
  in	
  lowercase	
  
•  XHTML	
  documents	
  must	
  have	
  one	
  root	
  
   element	
  
   –  <html>	
  
Syntax:	
  AMributes	
  
•  AMribute	
  names	
  must	
  be	
  in	
  lower	
  case	
  
    –  <img	
  src="picture.jpg"/>	
  
•  AMribute	
  values	
  must	
  be	
  quoted	
  
    –  <img	
  src="picture.jpg"/>	
  
•  XHTML	
  elements	
  must	
  be	
  in	
  lowercase	
  
•  XHTML	
  documents	
  must	
  have	
  one	
  root	
  
   element	
  
    –  <html>	
  
head -­‐	
  element	
  
•  One	
  mandatory	
  –	
  element:	
  Ktle	
  
    –  Very	
  important:	
  search	
  engines,	
  bookmarking	
  
•  Meta-­‐informaKon 	
  	
  
    –  hMp://www.w3schools.com/tags/tag_meta.asp	
  
•  Linking	
  to	
  other	
  files	
  (CSS)	
  
head	
  –	
  element,	
  example	
  
<?xml version="1.0"?>!
<!DOCTYPE html !
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"!
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">!
<html xmlns="http://www.w3.org/1999/xhtml">!
  <head>!
    <title>Minimal XHTML 1.0 Document</title>!
    <meta name="description" content="Simple XHTML example" />!
    <meta name="keywords" content="XHTML" />!
    <meta name="author" content="Jussi Pohjolainen" />!
  </head>!
  <body>!

  </body>!
</html>!
Element	
      DescripHon	
  
<p>            Defines	
  paragraph	
  
<br/>          Defines	
  a	
  single	
  line	
  break	
  
<blockquote>   Defines	
  a	
  long	
  quotaKon	
  
<pre>          Defines	
  preformaMed	
  text	
  
<em>           Defines	
  emphasized	
  text	
  	
  
<strong>       Defines	
  strong	
  text	
  
<code>         Defines	
  computer	
  code	
  text	
  
<tt>           Defines	
  teletype	
  text	
  
<i>            Defines	
  italic	
  text	
  
<b>            Defines	
  bold	
  text	
  
<big>          Defines	
  big	
  text	
  
<small>        Defines	
  small	
  text	
  
<sub>          Defines	
  subscripted	
  text	
  
<sup>          Defines	
  superscripted	
  text	
  
Links	
  
•  Linking	
  outside	
  (absolute	
  path)	
  
     –  <a href="http://www.tamk.fi">TAMK</a>
•  Link	
  inside	
  the	
  site	
  (relaKve	
  path)	
  
     –  <a href="dog.html">Info about my dog</a>
•  The	
  use	
  of	
  Ktle	
  
     –  <a href="http://www.tamk.fi" title="TAMK
        University of Applied Sciences">TAMK</a>
•  How	
  to	
  use?	
  See	
  
     –  hMp://www.cs.tut.fi/~jkorpela/webjulk/1.5.html	
  
Images	
  
•  Linking	
  to	
  a	
  image	
  
    –  <a href="face.jpg">My Face</a>
•  Adding	
  an	
  image	
  to	
  the	
  page	
  
    –  <img src="face.jpg" alt="Picture of me" />
•  Image	
  as	
  a	
  link	
  
    <a href="http://www.tamk.fi">
       <img src="tamk.jpg" alt="TAMK Logo" />
    </a>
•  Use	
  PNGs,	
  JPEGs	
  or	
  GIFs	
  
Lists	
  
•  <ul>	
  –	
  Unordered	
  list	
  
•  <ol>	
  –	
  Ordered	
  list	
  
•  <dl>	
  –	
  DefiniKon	
  list	
  
    –  <dt>	
  –	
  Ktle	
  
    –  <dd> -­‐	
  descripKon	
  
List	
  Examples	
  
<ul>                         <dl>
   <li>Some text</li>        <dt>term</dt>
   <li>Some text</li>
                             <dd>definition</dd>
</ul>
                             <dt>term</dt>
<ol>                         <dd>definition</dd>
   <li>Some text</li>        </dl>
   <li>Some text</li>
</ol>
In	
  Browser	
  
Tables	
  
•  Table	
  element	
  is	
  used	
  to	
  define	
  a	
  table	
  
    <table>
      <tr>
        <th>Month</th>
        <th>Savings</th>
      </tr>
      <tr>
        <td>January</td>
        <td>$100</td>
      </tr>
    </table>
Table	
  with	
  Heading	
  
<table>
  <tr>
    <th>Name</th>
    <th>Telephone</th>
    <th>Mobile Phone</th>
  </tr>
  <tr>
    <td>Bill Gates</td>
    <td>555 77 854</td>
    <td>555 77 855</td>
  </tr>
</table>
Combining	
  Columns	
  and	
  Rows	
  
<table>
   <tr>
     <td colspan="3">WWW-sivun osat</td>
   </tr>
   <tr>
     <td>Rakenne</td>
     <td colspan="2">Asiakaslaitteesta riippuva ulkoasu ja vuorovaikutus</td>
   </tr>
   <tr>
     <td>XHTML</td>
     <td>CSS</td>
     <td>JavaScript</td>
   </tr>
</table>

More Related Content

PPTX
Html 5 tutorial - By Bally Chohan
PPT
Span and Div tags in HTML
PPT
Html ppt
PPT
PDF
Introduction to XHTML
PPTX
PPTX
Css Text Formatting
PPT
Unit 2 dhtml
Html 5 tutorial - By Bally Chohan
Span and Div tags in HTML
Html ppt
Introduction to XHTML
Css Text Formatting
Unit 2 dhtml

What's hot (20)

PPTX
PPTX
Validation Controls in asp.net
PPTX
Web html table tags
PPTX
Low Level Design
PPTX
Graphics software standards
PDF
CSS notes
PPS
PPTX
Html table
PPT
Html presentation
PDF
Html frames
PDF
JavaScript - Chapter 12 - Document Object Model
PPTX
Images and Tables in HTML
PPT
Html project
PPT
Relational algebra in dbms
PPTX
PDF
Html table tags
PPTX
Html5 tutorial for beginners
PPTX
Html, CSS & Web Designing
Validation Controls in asp.net
Web html table tags
Low Level Design
Graphics software standards
CSS notes
Html table
Html presentation
Html frames
JavaScript - Chapter 12 - Document Object Model
Images and Tables in HTML
Html project
Relational algebra in dbms
Html table tags
Html5 tutorial for beginners
Html, CSS & Web Designing
Ad

Viewers also liked (8)

PPTX
Dhtml
PPT
Dynamic HTML
PPTX
PPTX
Dynamic HTML (DHTML)
PPTX
JSON: The Basics
PPT
Js ppt
Dhtml
Dynamic HTML
Dynamic HTML (DHTML)
JSON: The Basics
Js ppt
Ad

Similar to XHTML (20)

PDF
Introduction to XML, XHTML and CSS
PPSX
PDF
Xhtml Basics
PDF
xhtml_basics
PDF
Xhtml Basics
PDF
xhtml_basics
KEY
HTML/CSS Lecture 1
PPTX
Html and Xhtml
PPTX
LS2.1_V1_HTML.pptx
PDF
Introduction to HTML
PPTX
PPTX
Lecture 4 - Adding XTHML for the Web
PDF
Unit 4 - HTTP and the Web Services - IT
PPTX
Web page concept final ppt
PPTX
Web page concept Basic
PPT
Web Design-III IT.ppt
PPTX
PDF
Web I - 02 - XHTML Introduction
PDF
Xhtml tags reference
Introduction to XML, XHTML and CSS
Xhtml Basics
xhtml_basics
Xhtml Basics
xhtml_basics
HTML/CSS Lecture 1
Html and Xhtml
LS2.1_V1_HTML.pptx
Introduction to HTML
Lecture 4 - Adding XTHML for the Web
Unit 4 - HTTP and the Web Services - IT
Web page concept final ppt
Web page concept Basic
Web Design-III IT.ppt
Web I - 02 - XHTML Introduction
Xhtml tags reference

More from Jussi Pohjolainen (20)

PDF
Moved to Speakerdeck
PDF
Java Web Services
PDF
Box2D and libGDX
PDF
libGDX: Screens, Fonts and Preferences
PDF
libGDX: Tiled Maps
PDF
libGDX: User Input and Frame by Frame Animation
PDF
Intro to Building Android Games using libGDX
PDF
Advanced JavaScript Development
PDF
Introduction to JavaScript
PDF
Introduction to AngularJS
PDF
libGDX: Scene2D
PDF
libGDX: Simple Frame Animation
PDF
libGDX: Simple Frame Animation
PDF
libGDX: User Input
PDF
Implementing a Simple Game using libGDX
PDF
Building Android games using LibGDX
PDF
Android Threading
PDF
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
PDF
Creating Games for Asha - platform
PDF
Intro to Asha UI
Moved to Speakerdeck
Java Web Services
Box2D and libGDX
libGDX: Screens, Fonts and Preferences
libGDX: Tiled Maps
libGDX: User Input and Frame by Frame Animation
Intro to Building Android Games using libGDX
Advanced JavaScript Development
Introduction to JavaScript
Introduction to AngularJS
libGDX: Scene2D
libGDX: Simple Frame Animation
libGDX: Simple Frame Animation
libGDX: User Input
Implementing a Simple Game using libGDX
Building Android games using LibGDX
Android Threading
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Games for Asha - platform
Intro to Asha UI

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Digital-Transformation-Roadmap-for-Companies.pptx
Spectroscopy.pptx food analysis technology
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx

XHTML

  • 1. XHTML  1.0     Extensible  HyperText  Markup  Language   Jussi  Pohjolainen   Tampere  University  of  Applied  Sciences  
  • 2. What  is  XHTML?   •  XHTML™  1.0  The  Extensible  HyperText  Markup   Language  (Second  EdiKon)   –  hMp://www.w3.org/TR/xhtml1/   •  XHTML  is  a  family  of  current  and  future   document  types  and  modules  that  reproduce,   subset,  and  extend  HTML  4     •  XHTML  family  document  types  are  XML  based  
  • 3. Rules   •  XHTML  document  must  follow  the  XML  –  rules   (wellformed)   •  It  must  be  valid  against  one  of  three  DTDs   –  XHTML  Strict   •  Use  the  strict  DOCTYPE  when  you  want  really  clean  markup,  free  of   presentaKonal  cluMer.  Use  it  together  with  CSS.   –  XHTML  TransiKonal   •  Use  the  transiKonal  DOCTYPE  when  you  want  to  sKll  use  HTML's   presentaKonal  features.   –  XHTML  Frameset   •  Use  the  frameset  DOCTYPE  when  you  want  to  use  HTML  frames.     •  Root  element  must  be  html –  And  it  must  contain  xmlns  namespace  h7p://www.w3.org/ 1999/xhtml  
  • 4. XHTML  Example   <?xml version="1.0"?>! <!DOCTYPE html ! PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">! <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">! <head>! <title>Minimal XHTML 1.0 Document</title>! </head>! <body>! <p>This is a minimal <a href="http://www.w3.org/TR/ xhtml1/">XHTML 1.0</a> ! document.</p>! </body>! </html>!
  • 5. The  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">
  • 6. Mandatory  XHTML  Elements   <?xml version="1.0"?>! <!DOCTYPE html ! PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"! "http://www.w3.org/TR/xhtml1/DTD/xhtml1- strict.dtd">! <html xmlns="http://www.w3.org/1999/xhtml">! <head>! <title>Minimal XHTML 1.0 Document</title>! </head>! <body>! </body>! </html>!
  • 7. Syntax:  Elements   •  XHTML  elements  must  be  properly  nested   –  <b><i>hello</i></b>   •  XHTML  elements  must  always  be  closed   –  <br/>   •  XHTML  elements  must  be  in  lowercase   •  XHTML  documents  must  have  one  root   element   –  <html>  
  • 8. Syntax:  AMributes   •  AMribute  names  must  be  in  lower  case   –  <img  src="picture.jpg"/>   •  AMribute  values  must  be  quoted   –  <img  src="picture.jpg"/>   •  XHTML  elements  must  be  in  lowercase   •  XHTML  documents  must  have  one  root   element   –  <html>  
  • 9. head -­‐  element   •  One  mandatory  –  element:  Ktle   –  Very  important:  search  engines,  bookmarking   •  Meta-­‐informaKon     –  hMp://www.w3schools.com/tags/tag_meta.asp   •  Linking  to  other  files  (CSS)  
  • 10. head  –  element,  example   <?xml version="1.0"?>! <!DOCTYPE html ! PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">! <html xmlns="http://www.w3.org/1999/xhtml">! <head>! <title>Minimal XHTML 1.0 Document</title>! <meta name="description" content="Simple XHTML example" />! <meta name="keywords" content="XHTML" />! <meta name="author" content="Jussi Pohjolainen" />! </head>! <body>! </body>! </html>!
  • 11. Element   DescripHon   <p> Defines  paragraph   <br/> Defines  a  single  line  break   <blockquote> Defines  a  long  quotaKon   <pre> Defines  preformaMed  text   <em> Defines  emphasized  text     <strong> Defines  strong  text   <code> Defines  computer  code  text   <tt> Defines  teletype  text   <i> Defines  italic  text   <b> Defines  bold  text   <big> Defines  big  text   <small> Defines  small  text   <sub> Defines  subscripted  text   <sup> Defines  superscripted  text  
  • 12. Links   •  Linking  outside  (absolute  path)   –  <a href="http://www.tamk.fi">TAMK</a> •  Link  inside  the  site  (relaKve  path)   –  <a href="dog.html">Info about my dog</a> •  The  use  of  Ktle   –  <a href="http://www.tamk.fi" title="TAMK University of Applied Sciences">TAMK</a> •  How  to  use?  See   –  hMp://www.cs.tut.fi/~jkorpela/webjulk/1.5.html  
  • 13. Images   •  Linking  to  a  image   –  <a href="face.jpg">My Face</a> •  Adding  an  image  to  the  page   –  <img src="face.jpg" alt="Picture of me" /> •  Image  as  a  link   <a href="http://www.tamk.fi"> <img src="tamk.jpg" alt="TAMK Logo" /> </a> •  Use  PNGs,  JPEGs  or  GIFs  
  • 14. Lists   •  <ul>  –  Unordered  list   •  <ol>  –  Ordered  list   •  <dl>  –  DefiniKon  list   –  <dt>  –  Ktle   –  <dd> -­‐  descripKon  
  • 15. List  Examples   <ul> <dl> <li>Some text</li> <dt>term</dt> <li>Some text</li> <dd>definition</dd> </ul> <dt>term</dt> <ol> <dd>definition</dd> <li>Some text</li> </dl> <li>Some text</li> </ol>
  • 17. Tables   •  Table  element  is  used  to  define  a  table   <table>   <tr>     <th>Month</th>     <th>Savings</th>   </tr>   <tr>     <td>January</td>     <td>$100</td>   </tr> </table>
  • 18. Table  with  Heading   <table> <tr> <th>Name</th> <th>Telephone</th> <th>Mobile Phone</th> </tr> <tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </tr> </table>
  • 19. Combining  Columns  and  Rows   <table> <tr> <td colspan="3">WWW-sivun osat</td> </tr> <tr> <td>Rakenne</td> <td colspan="2">Asiakaslaitteesta riippuva ulkoasu ja vuorovaikutus</td> </tr> <tr> <td>XHTML</td> <td>CSS</td> <td>JavaScript</td> </tr> </table>

Editor's Notes

  • #17: http://css.maxdesign.com.au/listamatic/