introduction to xhtml professor stephen kwan. 2 xhtml html stylesheets xml cascadingstylesheets(css)...

8
Introduction to XHTML Introduction to XHTML Professor Stephen Kwan

Post on 21-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

Introduction to XHTMLIntroduction to XHTML

Professor Stephen Kwan

Page 2: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

2

XHTMLXHTML

HTMLHTML StyleStyleSheetsSheets

XMLXML

CascadingCascadingStyleStyle

SheetsSheets(CSS)(CSS)

ExtensibleExtensibleStylesheetStylesheetLanguageLanguage

(XSL)(XSL)

StructureStructure FormatFormat ContentContent

DynamicDynamic

Scripts &Scripts &DocumentDocument

ObjectObjectModel Model (DOM)(DOM)

Page 3: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

3

Three DTD’s for ComplianceThree DTD’s for Compliance

TransitionalTransitional

StrictStrict

FramesetFrameset

XHTMLXHTML

DDocument ocument TType ype DDefinitionsefinitions

Page 4: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

4

Differences between XHTML and HTMLDifferences between XHTML and HTML

• XHTML is case-sensitive, all attribute values must be in quotes, cannot minimize attribute values

• XHTML elements must be in lower case• All XHTML elements must be closed• All XHTML elements must be properly nested.

<title> must be first element in <head>• A DOCTYPE of Strict, Transitional or Frameset DTD

must be specified• A namespace must be specified for the document’s

schema

Page 5: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

5

XHTML Document PrototypeXHTML Document Prototype

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN“ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">

<!-- Author: Stephen Kwan File Name: deitel.htm Description: Study Notes for Deitel, Deitel and Nieto Date Last Update: 09/16/2001 --><head><title> </title></head><body>

</body></html>

Page 6: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

6

HTML Document PrototypeHTML Document Prototype

<html><!-- Author: Stephen Kwan File Name: deitel.htm Description: Study Notes for Deitel, Deitel and Nieto Date Last Update: 09/16/2001 --><head><title> </title></head><body>

</body></html>

Page 7: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

7

HTML Document PreparationHTML Document Preparation

TextPad,

Page 8: Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent

8

Dynamic HTMLDynamic HTML

NetscapeNetscapeDHTMLDHTML

MicrosoftMicrosoftI.E. DHTMLI.E. DHTML

CSSCSSLevel 1Level 1

JavaScript 1.2JavaScript 1.2

CSS-PCSS-P

Layers

JSS

VisualFilters

DynamicCSS

Cross-Browser DHTMLCross-Browser DHTML

• Use HTML and Scripting - use Browser only

• Cross platform

• and browser

• Enhance the visual appeal and interactivity of document