01 XHTML

01 XHTML - XHTML . Mary ET Boyle, Ph.D. Department of...

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

View Full Document Right Arrow Icon
XHTML …. Mary ET Boyle, Ph.D. Department of Cognitive Science UCSD Ready to go. .. you need. ... • you need a text editor pico NotePad++ TextWrangle (pico, , TextWrangler) • first type in the text • then add the Tags around to format it • type in a name for the Web page xxx .html **note** file names can contain letters & numbers, but NO spaces • save as a Text Document (NotePad, WordPad) • The main web page should be named index.html
Background image of page 1

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

View Full DocumentRight Arrow Icon
Well-formed XHTML Docs • The syntax rules are: – Must contain one root element: Must contain one root element: <html> ….. </html> – All elements must have a start and end tag. – Elements must be nested properly. – Attributes must be placed in the start tag and no attribute can appear more than once – Element names are case sensitive XHTML tags are in lowercase Well formed vs. Valid Documents • A well formed document is one in which the statements adhere to the structural rules of the language. • Applies to the syntax. • In order for the document to be valid, the contents must also conform to the DTD (DTD = Document Type Definition) DOCTYPE declaration • DTD contains the set of all valid element and attribute names that can be used for that document type <DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
Background image of page 2
How XHTML docs are structured 1 Document prolog Three parts of an XHTML document! 1. contains information that the browser needs to know about the Web page 2. Header section contains information that is not displayed in the browser’s Web page display 3. Body of document contains text and graphic inside the body element which are displayed in the browser’s Web page display <?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> <head> . . . </head> <body> . <!-- Body of document goes here --> . </body> </html>
Background image of page 3

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

View Full DocumentRight Arrow Icon
DOCTYPE tag <DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html> and </html> the root element <html> first line of your doc first line of your doc (after the doctype tag)! </html> last line of your doc! • need to identify the particular document as an XHTML document. • you gotta tell it where it begins and ends!
Background image of page 4
<head> Title </head> • The head contains information about the The head contains information about the Web page, such as the title. • Although Browsers will display Web pages without the head Tags, it is considered proper form to include them proper form to include them. So far, your doc looks like this: <?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> <head> this is where your title goes </head> </html>
Background image of page 5

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

View Full DocumentRight Arrow Icon
<title> My beautiful Page </title> <head> <title> letters and numbers only </title> </head> • Your title will appear in the title bar of a Web Browser window.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 26

01 XHTML - XHTML . Mary ET Boyle, Ph.D. Department of...

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

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