1 / 13

HTML & XHTML

HTML & XHTML. Introduction. First HTML. 1992 Marked-up text to represent a hypertext document for transmission over the network The hypertext mark-up language is an SGML format The 1st web page was created. Versions of HTML - HTML 2.0. 1996

torie
Download Presentation

HTML & XHTML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML & XHTML Introduction

  2. First HTML • 1992 • Marked-up text to represent a hypertext document for transmission over the network • The hypertext mark-up language is an SGML format • The 1st web page was created

  3. Versions of HTML - HTML 2.0 • 1996 • Can represent hypertext news, mail, documentation, and hypermedia; • Menus of options; • Database query results; • Simple structured documents with in-lined graphics

  4. HTML 3.2 • Tables, applets, text-flow around images, superscripts and subscripts • Provided backwards compatibility with the existing HTML 2.0 Standard.

  5. HTML 4.0 & 4.01 • Supports more • Multimedia options • Scripting languages • Style sheets • Better printing facilities • Accessible to users with disabilities • Internationalization of documents • Last of HTML

  6. XML • eXtensible Markup Language • Developed by the W3C • A subset of SGML constituting a particular text markup language for interchange of structured data • A flexible way to create standard information structure • Share data & structure over the Web

  7. Example • XML file • CSS file • More at http://www.xml.com/

  8. Sample XML <Video> <Movie> <Year>1996</Year> <Title>Mission: Impossible</Title> <Director>Brian De Palma</Director> <Type>Action</Type> <Actor_Male>Tom Cruise</Actor_Male> <Actor_Female>Emmanuelle Beart</Actor_Female> <Time>110</Time> <Rating>PG-13</Rating> </Movie> <Movie> <Year>2004</Year> <Title>Home on the Range</Title> <Director>Will Finn</Director> <Type>Comedy</Type> <Actor_Male>G.W. Bailey</Actor_Male> <Actor_Female>Roseanne</Actor_Female> <Time>76</Time> <Rating>PG</Rating> </Movie> </Video> <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="bellvideo-css.css"?> <!-- File Name: bellvideo.xml --> <!DOCTYPE Video [ <!ELEMENT Video (Movie+)> <!ELEMENT Movie (Year, Title, Director, Type, Actor_Male, Actor_Female, Time, Rating)> <!ELEMENT Year (#PCDATA)> <!ELEMENT Title (#PCDATA)> <!ELEMENT Director (#PCDATA)> <!ELEMENT Type (#PCDATA)> <!ELEMENT Actor_Male (#PCDATA)> <!ELEMENT Actor_Female (#PCDATA)> <!ELEMENT Time (#PCDATA)> <!ELEMENT Rating (#PCDATA)> ] >

  9. HTML + XML  XHTML • Extensible Hypertext Markup Language • Application of XML • Successor to HTML • Reformulation of HTML 4.0 in XML 1.0 • Stricter remaking of HTML • Deprecated tags – phasing out some tags from HTML 4.01

  10. Rules of XHTML • Use all lowercase letters for tags • Nest elements correctly • <b><i>This is wrong.</b></i> • <b><i>This is right.</i></b>. • Always use end tags • End empty elements • <br>  <br /> <hr>  <hr /> • Error in page 57 in the textbook

  11. Rules of XHTML (cont.) • Use quotation marks for values • <h1 align=center>  <h1 align=“center“> • Give every attribute a value • <hr noshade />  <hr noshade=“noshade” /> • Use code for special characters • <img alt="Me & My Son"> <img alt="Me &amp; My Son">.

  12. Rules of XHTML (cont.) • Use id insead of name • < a name=“toc”>  <a id=“toc”> • Put styles and scripts in separate file • Declare DOCTYPE Resource: http://personalweb.about.com/od/basichtml/a/409xhtml.htm

  13. Template <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>TITLE OF PAGE GOES HERE</title> </head> <body> CONTENT OF PAGE GOES HERE. </body> </html>

More Related