02XHTML - 1 XHTML eXtensible HyperText Markup Language 2 Contents • Understanding XHTML – Title Section Headers – New Paragraph and Line

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 XHTML - eXtensible HyperText Markup Language 2 Contents • Understanding XHTML – Title, Section Headers – New Paragraph, and Line Break – Images – Hyper Links 3 HyperText Markup Language (HTML) • HTML is the markup language for creating web pages, could be hand-written or generated by tools such as Front Page or Dreamweaver • What does HTML looks like? 4 Extensible HyperText Markup Language (XHTML) • XHTML ( http://www.w3.org/TR/xhtml1/ ) – Hybrid of HTML & XML. It uses the XML Document Type Definitions (DTD) – collections of declarations that tell the browser how to treat the structure, elements and attributes of the tags. – Advantage: Allows extension and future enhancement (e.g. non-PC platform) 5 What does DTD looks like? <!--================ Document Structure ==================================--> <!-- the namespace URI designates the document profile --> <!ELEMENT html (head, body )> <!ATTLIST html %i18n; id ID #IMPLIED xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml' > <!--================ Document Head =======================================--> <!ENTITY % head.misc "(script|style|meta|link|object)*"> <!-- content model is %head.misc; combined with a single title and an optional base element in any order --> <!ELEMENT head (%head.misc;, (( title , %head.misc;, ( base , %head.misc;)?) | (base, %head.misc;, (title, %head.misc;))))> <!ATTLIST head %i18n; id ID #IMPLIED profile %URI; #IMPLIED > 6 Basic Syntax of a (X)HTML Statement • Element – It is a label that identifies and structures the different parts of a web page. – A non-empty element consists of an opening tag, the content, and a closing tag. <title> XHTML Basic </title> – An empty element consists of the initial less than sign, the element’s name, a space, a forward slash, and the final greater than sign. < br / > Opening tag Content Close tag Initial less than sign Element name Forward slash Final great than sign 7 Basic Syntax of a (X)HTML Statement • Attribute and Value – They contain information that further describe the purpose and content of the element. – An attribute’s value must always be enclosed in quotation marks . <a href = "logon.html" >Log on</a> <img src = “myAccounts.gif" width = “210” /> Attribute Value Attribute Value for src Attribute Value for width 8 Basic (X)HTML Structure <meta name="author" content="" /> 6 <meta name="description" content="" /> 7 <meta name="keywords" content="" /> 8 <?xml version="1.0" encoding="UTF-8"?> 1 </html> 14 </body> 13 12 <body> 11 </head> 10 <title>Untitled Document</title> 9 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 5 <head> 4 <html xmlns="http://www.w3.org/1999/xhtml” xml:lang=“en”> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 9 Basic (X)HTML Structure • Line 1 – XML Declaration – It specifies the version of XML being used and the character encoding of the document....
View Full Document

This note was uploaded on 01/11/2011 for the course CS 5281 taught by Professor Jianyingwang during the Summer '10 term at City University of Hong Kong.

Page1 / 59

02XHTML - 1 XHTML eXtensible HyperText Markup Language 2 Contents • Understanding XHTML – Title Section Headers – New Paragraph and Line

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online