uk
CSC1014
Topics
Why are web standards important? (X)HTML, SGML & DTD for web pages Deprecated tags and attributes XHTML validation Who manages other web standards?
JISC Netskills
CSC1014
Evolved with the help of (and in spite of) major software/hardware manufacturers Often thought (wrongly) to be solely connected with W3C Always important but now practical and usable Often part of legal requirements
JISC Netskills
CSC1014
Fixing software is not the only problem Web developers also hold the key
Frustrated or ignorant or both? "Designers" who don't understand the web Implications of third party content creation solutions
CSC1014
Marked up documents should contain a DTD declaration The W3C (World Wide Web Consortium) publishes DTDs for each version of (X)HTML
Along with recommendations as to how user-agents (e.g. web browsers) should interpret and render the marked up content
JISC Netskills
CSC1014
(X)HTML DTDs
All versions of HTML/XHTML have at least two associated DTDs Strict
Contains only the current, valid tags and attributes
Retains deprecated definitions for some older markup to allow backwards compatibility HTML 4.01 Strict or XHTML 1.0 Strict are both good
JISC Netskills
CSC1014
DTD declarations
HTML 4.01 Strict
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Transitional
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Transitional
JISC Netskills
CSC1014
DTD Snippet
A DTD is a text file
Designed to be machine-read Used by a validator to check a document
Definition for a <textarea> tag List of permitted attributes for <textarea>
<!-- multi-line text field --> <!ELEMENT textarea (#PCDATA)> <!ATTLIST textarea %attrs; %focus; name CDATA #IMPLIED rows %Number; #REQUIRED cols %Number; #REQUIRED disabled (disabled) #IMPLIED readonly (readonly) #IMPLIED onselect %Script; #IMPLIED onchange %Script; #IMPLIED >
JISC Netskills
CSC1014
Deprecated code is invalid for strict HTML 4.01 Strict (and therefore XHTML 1.0 Strict)
If it used, pages must use the Transitional DTD declaration
Most deprecations are associated with style and layout e.g. <font></font>tags, align attributes etc.
Deprecated code will have a more up-to-date alternative, usually achieved with CSS (Cascading Style Sheets)
JISC Netskills
CSC1014
XHTML validation
Validation parses source document and compares against a DTD Lots of tools available
Online/offline, standalone/integrated into other systems Access directly at http://validator.w3.org
Get used to using the W3C Validation Service Good browser tools now exist too e.g.
Firebug (Firefox extension) Chrome and IE9 (built in) Web Developer Toolbar (Firefox & Chrome extension)
JISC Netskills
CSC1014
CSC1014
Microsoft, Apple, Google, Yahoo!, IBM, BBC, BT Mozilla Foundation, Apache foundation, Walt Disney Internet Group http://www.w3.org/Consortium/Member/List
CSC1014
CSC1014
The technical standard for JavaScript An ISO standard for making markup languages Describes the interconnection of the protocols which make the internet work Managed by Internet Engineering Task Force (IETF) http://www.webstandards.org/learn/external/orgs/
JISC Netskills
CSC1014
Reference URLs
W3C HTML home page, specifications and FAQ
http://www.w3.org/html/ http://www.w3.org/TR/html4/ http://www.w3.org/TR/xhtml1/ http://www.w3.org/MarkUp/2004/xhtml-faq
JISC Netskills