2. 2
What is the WWW?
A distributed document delivery system
Uses a client-server model
Main presentation language is HTML
3. 3
Client-Server Model
Two processes (possibly networked):
īŽ The client
īˇ Sends requests to the server
īˇ Blocks until reply is received
īŽ The server
īˇ Processes requests from clients
īˇ Never blocks
īˇ Can reply to several clients simultaneously
4. 4
HTML
Hypertext Markup Language
Intended to be maximally portable
īŽ Logical markup
īŽ Graceful degradation of presentation
An ideal promoted by early WWW
īŽ Used to be more honoured in the breach
īŽ Is it getting better now?
5. 5
Markup Languages
Markup:
īŽ Embedded codes in documents
īŽ Codes are called `tagsâ
īŽ Codes
īˇ Describe the structure documents
īˇ Include instructions for processing
Markup language:
īŽ Computer language for describing syntax of tags
īŽ May be used with other tools to specify rendering
6. 6
Logical Markup
Logical markup:
īŽ Describes parts of document
īŽ Does not specify how to render
Example:
īŽ This is <strong>very</strong> important
īŽ This is very important
7. 7
Logical Markup
Presentation is clientâs `decisionâ
When client cannot present then there
is graceful degradation
ī§ <img alt=âimage descriptionâ
ī src=âfoo.gifâ>
īŽ Object example from Cougar
8. 8
Some history
Gopher & the Internet Superhighway
SGML
īŽ GML + Charles Goldfarb = SGML
īŽ eXtensible Markup Language
HTML
XML and XHTML
9. 9
Why HTML became XHTML
HTML was originally a SGML
application
īŽ Tags described the syntax
īŽ A DTD could check the syntax
īŽ Informal mapping from syntax to rendering
Multiple incompatible versions arose
īŽ IETF moves at ânet speed not web $peed
īŽ Tag abuse was rampant in the ânet
īŽ They were a plague unto the users
10. 10
Why HTML became XHTML
(2)
If you think IMG is bad âĻ
Big vendors (M$ and N$ mostly) agreed
īŽ To start over
īŽ To use eXtensible Markup Language
īˇ A re-write of SGML emphasizing simplicity
īˇ Carefully planned by CS savvy folks
īˇ Includes hooks for future development
11. 11
XHTML Basics
Very few real changes from HTML
But more strict
All tags are in lowercase
All tags must be closed
īŽ Empty tags
īŽ Paired tags
12. 12
XHTML Basics
3 Parts to an XHTML or HTML document
īŽ DOCTYPE
īˇ What DTD are you using
īŽ Head
īˇ Meta information
īˇ Only <title> is required
īŽ Body
īˇ Text to render
15. 15
XHTML Tags vs. Elements
Tag is markup to represent an element
Logical vs. Presentation Elements
īŽ TT â CODE, KBD, PRE?
īŽ B/IT/U â EM/STRONG
Lists
īŽ UL/OL
īŽ DL
16. 16
XHTML Tags vs. Elements
Block-level and in-line elements
īŽ TABLE, P, BLOCKQUOTE, DIVDIV, etc.
īŽ CODE, Q, H1, SPANSPAN, etc.
Grouping Elements
īŽ DIV
īŽ SPAN
One-part elements
īŽ BR, etc.
17. 17
XHTML Tags vs. Elements
Browser-specific tags
MARQUEE, BLINK, etc.
What happens when a browser doesn't
recognize a tag?
20. 20
Links â Why The WWW Is
HT
âAâ element
īŽ HREF
īŽ NAME
īŽ CLASS
īŽ REL
īŽ TYPE
URIs and
URLs
RFCs
īŽ TITLE
īŽ ID
īŽ STYLE
īŽ Anchor Text
īŽ TABINDEX
21. 21
Where are the tools?
HTML Tidy
īŽ /opt/bin/tidy on borg
The validator
īŽ http://validator.w3.org/
īŽ http://www.cs.dal.ca/validator?
īŽ http://www.cs.dal.ca/validate?
īŽ http://www.cs.dal.ca:81?
23. 23
For More About HTML
RFC 1866 (HTML 2.0) (at faqs.org)
Explains some of the philosophy behind HTML
HTML 4.01 (at W3C)
Last version of HTML
XHTML 1.1 (at W3C)
Modularized XHTML
So many choices!âĻ
24. 24
Which Standard to Follow?
Minimal standard for this course is
HTML 4.01 Transitional
Preferred standard is XHTML 1.0 or 1.1
See Picking a Rendering Mode
īŽ By Eric Meyer
īŽ In the Readings part of the Resources