Download presentation
Presentation is loading. Please wait.
Published byPatrick Cannon Modified over 8 years ago
1
HTML is about making documents
2
Simple Code for Simple Layout My Document This is an example HTML document First paragraph Second paragraph This is the first paragraph. It doesn't really say very much. Now is the time for all good men to come to the aid of their country. This is the second paragraph. The quick brown fox jumped over the lazy dog.
3
HTML: The Beginning HTML began as a language for encoding simple document semantics Things to See in London The Millenium Dome is great.
4
HTML: Effects through Bloating It became more bloated to allow more design precision and visual effects. Things to See in London The Millenium Dome is great.
5
HTML: Simplicity through Style Until precise style specifications were added. Things to See in London The Millenium Dome is great. Large font, bold, red Normal font, indent 1cm, centered Any font denoting emphasis
6
HTML: Style is All But then the names of the tags became irrelevant. Things to See in London The Millenium Dome is great. Large font, bold, red Normal font, indent 1cm, centered Any font denoting emphasis
7
HTML: Or are Data and Style Equal? So invent your own for your own applications. Things to See in London The Millenium Dome is great. Large font, bold, red Normal font, indent 1cm, centered Any font denoting emphasis
8
HTML: Or is Data All? And forget the display semantics. Information is for using, not looking at! Things to See in London The Millenium Dome is great. The result of this transformation is XML
9
XML Example (Viewed in Notepad) The Language of Science Danzig 5.95 3
10
XML Example (Viewed in IE)
11
XML Components Elements Attributes Entities Declarations Processing Instructions Document Type Definitions (DTDs)
12
XML Components - Elements Elements form a hierarchical decomposition Book Chapter Para
13
XML Components – Element Structure Elements form a tree book chapter para parent child ancestor descendant sibling
14
XML Components - Attributes Attributes label elements book chapter para number=1 number=2 type = info id = xyz
15
Entities contain document fragments Like files, web pages or ‘containers’ XML Components - Entities book chapter para ß
16
XML Components - misc Markup declaration defines entities, elements, attributes, DTDs, comments, marked sections. Processing instructions interpret elements and content DTDs constrain elements, attributes and content. DTDs provide a simple grammar.
17
XML Syntax (1) Elements surrounded by start and end tags contents of foo element empty element tag for no data equivalent to names are case sensitive
18
Element content may be data mixed element only Click here XML Syntax (2) Just text data Text and element data
19
XML Syntax (3) Element recognition naked angle brackets cannot appear if(3 must appear as if(3 < 4)die("Math bug");… applies to left angle bracket << right angle bracket >> ampersand &&
20
XML Syntax (4) Attributes provide extra information Merge with Microsoft tomorrow! both names and values are case sensitive values MUST be quoted with " or '
21
XML Syntax (7) Standard entities predefined left angle bracket << right angle bracket >> ampersand && apostrophe '' double quote "" character entities decimal ASCII AA hexadecimal UNICODEéé
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.