XHTML Resources
Extensible Hypertext Markup Language
- Web Programming Top ics ...
-
- Editors for XHTML
- SearchWebServices.com, presented by TechTarget
- XFrames - W3C Working Draft
- XHTML 1.0: The Extensible HyperText Markup Language
- XHTML.ORG: A source of information about XHTML
- W3C - HTML 1.0: The Extensible HyperText Markup Language
- WDVL: Introduction to XHTML, with eXamples
- WebReview.com: Everything You Never Need to Know About HTML 4.0
-
- HTML is deprecated (a legacy technology) of the W3C. HTML commonly contains content, structure, and formatting.
- XHTML must not contain the document's formatting. Strict XHTML allows only the doc's content and structure.
- Presentation
- = formatting = the document's appearance when rendered by a browser.
- Normally, such formatting is specified with style sheets.
- Structure
- Elements (specify the document's structure)
- html
- head
- title
- meta elements
- style sheets
- scripts
- etc.
- body
- Tags
- start/end tags
- attributes = additional information about an element
- name
- = (equal sign)
- value
- "double quotes" or 'single quotes' are required
- case sensitive
- HTML Tags
- Block-level Elements
- Block-level elements contain blocks of text and can organize text into paragraphs. Block-level elements should have a line break or paragraph break before and after the element. Block-level elements can be container tags for other block-level and text-level elements.
- h1...h6, p, hr, center, blockquote, noframes, noscript, fieldset, isindex, ul, ol, , dl, div, ...
- Text-level Elements = In-line Elements
- Text-level elements don't start new paragraphs - instead, text-level elements are usually used within a paragraph. Text-level elements can only be used as containers for other text-level elements (nesting).
- a, basefont, font, big, small, br, img, map, q, sub, sup, object, script, span, b, i, u, strike, s, small, tt, i, cite, em, acronym, code, dfn, samp, strong, kbd, var, ins, del, ...
Hints
- Make sure your !DOCTYPE is set to Strict
- Check that all the XHTML elements are terminated. (Even the empty tags must have both start and end tags.)
- Include relevant comments where necessary.
- In spite of what the book may say, you must have your page on a Website. You must upload your page to a Web server.
- Specific hints:
- Required XHTML lines added to the top of the document
- All tags changed to lowercase
- All Hexadecimal values put in quotations
- xmlns= added to <html> tag
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <body> tag formatting removed - (you must use CSS for formatting)
- <center> tag removed - (you must use CSS for formatting)
- <font> tag removed - (you must use CSS for formatting)
- text must be inside some block tag like <p> tags
- <br> tag changed to <br />
- <br /> tags must be inside <p> tags
- <hr> attributes removed - (you must use CSS for formatting)
- <hr> tag changed to <hr />
- The next step will be to set up style sheets to put in all the formatting we just lost.
- XHTML is case-sensitive.
- XHTML requires all tags to be lowercase.
- XHTML requires all attribute values to be placed within straight quotation marks.
- XHTML requires that every tag be closed. (e.g. <br />)
- XHTML requires the DOCTYPE identifier (above the <html> tag.)
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">