DOC PREVIEW
NOVA ITE 115 - Lecture Notes

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ITE 115 Working with XHTMLObjectivesIntroducing XHTMLSlide 4Slide 5DTDs associated with XHTML 1.0Slide 7Slide 8Creating a Well-Formed DocumentSlide 10Attribute minimization in HTML and XHTMLCreating a Valid DocumentSlide 13Slide 14Attributes prohibited in the strict DTDRequired XHTML attributesCreating an XHTML DocumentCharacter SetsAdding an xml DeclarationSlide 20The XML DeclarationThe xml NamespaceSlide 23Setting the XHTML NamespaceTesting an XHTML DocumentFixing the errors in the paragraph elementsReport showing a successful validation under XHTML 1.0 transitionalSlide 28Using Style Sheets and XHTMLSlide 30Tips for Converting old HTML Code to XHTMLSlide 32Slide 33Slide 34Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive1XPITE 115 Working with XHTMLCreating a Well-Formed Valid DocumentTutorial 9Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive2XPObjectives•Introducing XHTML•Creating a Well-Formed Document•Creating a Valid Document•Creating an XHTML Document•Testing an XHTML Document•Using Style Sheets and XHTMLTutorial 9 New Perspectives on HTML and XHTML, Comprehensive3XPIntroducing XHTML•SGML (Standard Generalized Markup Language) –can be used with almost any type of document stored in almost any format–Introduced in the 1980s–Metalanguage– used to created other languages•HTML–standards get confusing among browsers– can be applied inconsistentlyTutorial 9 New Perspectives on HTML and XHTML, Comprehensive4XPIntroducing XHTML•XML (Extensible Markup Language) –used to design markup languages•XML documents must be evaluated with an XML parser.•An XML document with correct syntax is a well-formed document.•A well-formed document with correct content and structure is a valid document.•DTD specifies correct content and structure.Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive5XPIntroducing XHTML•XHTML is a reformulation of HTML, written in XML.Versions of XHTMLTutorial 9 New Perspectives on HTML and XHTML, Comprehensive6XPDTDs associated with XHTML 1.0- transitional: supports many of the presentational features of HTML, including the deprecated elements and attributes. Best used for older documents that contain deprecated features.Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive7XPDTDs associated with XHTML 1.0- frameset: used for documents containing frames, and also supports deprecated elements and attributesTutorial 9 New Perspectives on HTML and XHTML, Comprehensive8XPDTDs associated with XHTML 1.0- strict: does not allow any presentational features or deprecated HTML elements and attributes. Does not support frames or inline frames. It is best used for documents that need to strictly conform to the latest standards.Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive9XPCreating a Well-Formed DocumentRules for well-formed XHTML documentsTutorial 9 New Perspectives on HTML and XHTML, Comprehensive10XPCreating a Well-Formed Document•XHTML documents must also include a single root element that contains all other elements.–For XHTML, that root element is the html element.•Attribute minimization is when some attributes lack attribute values.–XHTML doesn’t allow attribute minimization.Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive11XPAttribute minimization in HTML and XHTMLTutorial 9 New Perspectives on HTML and XHTML, Comprehensive12XPCreating a Valid Document•The DTD used depends on the content of the document and the needs of your users.•To support old browsers, use the transitional DTD.•To support old browsers in a framed Web site, use the frameset DTD.•To support more current browsers and want to weed out any use of deprecated features, use the strict DTD.Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive13XPCreating a Valid Document•Elements not allowed under the strict DTD:–applet - isindex–basefont - menu–center - s–dir - strike–font - u–iframeTutorial 9 New Perspectives on HTML and XHTML, Comprehensive14XPCreating a Valid Document•Some attributes are restricted, while others are required in XHTMLTutorial 9 New Perspectives on HTML and XHTML, Comprehensive15XPAttributes prohibited in the strict DTDTutorial 9 New Perspectives on HTML and XHTML, Comprehensive16XPRequired XHTML attributesTutorial 9 New Perspectives on HTML and XHTML, Comprehensive17XPCreating an XHTML Document•The first line of an XTHML document should contain a declaration indicating that the document adheres to the rules and syntax of XML.•XML (and thus XHTML) documents are based on a character set.–A character set is a set of abstract symbols matched to code numbersTutorial 9 New Perspectives on HTML and XHTML, Comprehensive18XPCharacter Sets•Universal Character Set (UCS)•Unicode•Character encoding is the process in which bytes are translated back into characters (when a document is sent across the Internet).Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive19XPAdding an xml Declaration• To declare that a document is written in XML, enter the following as the first line of the file:<?xml version=“value” encoding=“type” standalone=“type” ?>Where the version attribute indicates the XML version of the document, the encoding attribute specifies the character encoding, and the standalone attribute indicates whether the document contains references to an external DTD.Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive20XPAdding an xml Declaration• For XHTML documents, use the declaration:<?xml version=“1.0” encoding=“UTF-8” standalone=“no” ?>Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive21XPThe XML Declaration• You can also add the DOCTYPE declaration, which tells XML parsers what DTD is associated with the document.<!DOCTYPE root type “id” “url”>Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive22XPThe xml Namespace• A namespace is a unique identifier for elements and attributes originating from a particular document type (like XHTML or MathML)• Two types of namespaces:- default: applied to a root element and any element within it<root xmlns=“namespace”>Tutorial 9 New Perspectives on HTML and XHTML, Comprehensive23XPThe xml Namespace• local: applies to only select elements- Each element in the local namespace is marked by a prefix attached to the element namexmlns: prefix=“namespace”- Identify any element belonging to that


View Full Document

NOVA ITE 115 - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?