Upload
saurav-patni
View
227
Download
2
Embed Size (px)
DESCRIPTION
ok
Citation preview
WWW/HTML BasicsCS 4173
What is the WWW?A distributed document delivery systemUses a client-server modelMain presentation language is HTML
Client-Server ModelTwo processes (possibly networked):The clientSends requests to the serverBlocks until reply is receivedThe serverProcesses requests from clientsNever blocksCan reply to several clients simultaneously
HTMLHypertext Markup LanguageIntended to be maximally portableLogical markupGraceful degradation of presentation
An ideal promoted by early WWWUsed to be more honoured in the breachIs it getting better now?
Markup LanguagesMarkup:Embedded codes in documentsCodes are called `tagsCodesDescribe the structure documentsInclude instructions for processingMarkup language:Computer language for describing syntax of tagsMay be used with other tools to specify rendering
Logical MarkupLogical markup:Describes parts of documentDoes not specify how to render
Example:This is very importantThis is very important
Logical Markup Presentation is clients `decisionWhen client cannot present then there is graceful degradation
Object example from Cougar
Some historyGopher & the Internet Superhighway
SGMLGML + Charles Goldfarb = SGMLeXtensible Markup Language
HTML
XML and XHTML
Why HTML became XHTMLHTML was originally a SGML applicationTags described the syntaxA DTD could check the syntaxInformal mapping from syntax to renderingMultiple incompatible versions aroseIETF moves at net speed not web $peedTag abuse was rampant in the netThey were a plague unto the users
Why HTML became XHTML (2)If you think IMG is bad
Big vendors (M$ and N$ mostly) agreedTo start overTo use eXtensible Markup LanguageA re-write of SGML emphasizing simplicityCarefully planned by CS savvy folksIncludes hooks for future development
XHTML BasicsVery few real changes from HTMLBut more strict
All tags are in lowercaseAll tags must be closed Empty tagsPaired tags
XHTML Basics3 Parts to an XHTML or HTML documentDOCTYPEWhat DTD are you usingHeadMeta informationOnly is requiredBodyText to render
XHTML Document Structure
XHTML BasicsTagsElementsAttributesEntities,&, ,,,, etc.See example at CS4173 websiteComments
s is (the non-breaking space)
XHTML Tags vs. ElementsTag is markup to represent an element
Logical vs. Presentation ElementsTT CODE, KBD, PRE?B/IT/U EM/STRONGListsUL/OLDL
XHTML Tags vs. ElementsBlock-level and in-line elementsTABLE, P, BLOCKQUOTE, DIV, etc.CODE, Q, H1, SPAN, etc.Grouping ElementsDIVSPANOne-part elementsBR, etc.
XHTML Tags vs. ElementsBrowser-specific tags
MARQUEE, BLINK, etc.
What happens when a browser doesn't recognize a tag?
XHTML BasicsTags may be nested but Tags may not overlap
Overlap versus Nesting
Links Why The WWW Is HTA elementHREFNAMECLASSRELTYPEURIs and URLsRFCs
TITLEIDSTYLEAnchor TextTABINDEX
Where are the tools?HTML Tidy/opt/bin/tidy on borg
The validatorhttp://validator.w3.org/http://www.cs.dal.ca/validator?http://www.cs.dal.ca/validate?http://www.cs.dal.ca:81?
XHTML/HTML ExamplesXHTML element sampler XHTML sample template
Both in the examples section of the website
For More About HTMLRFC 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!
Which Standard to Follow?Minimal standard for this course is HTML 4.01 TransitionalPreferred standard is XHTML 1.0 or 1.1
See Picking a Rendering ModeBy Eric MeyerIn the Readings part of the Resources
Here endeth the lesson
s is (the non-breaking space)