Section+2+-+Week+11+-+Web+design+CSS+XHTML

Jason Ramsumair Alex Anderson Tim Gaffley Sachin Massey Adam Lauzier Steve Saint-Ulysse

CSS stands for Cascading Style sheets. CSS is beneficial because it allows you to edit potentially thousands of pages in one place. CSS can be linked to HTML by placing this code in the head: 

What this means is that CSS needs a selector, body in this case, you must then put curly brackets with a proerty : value(s) on the inside of them like this: body { font-family : Verdana, sans serif; }

XHTML (//eXtensible Hypertext Markup Language)//
 * Users demanded control over the //appearance// of documents
 * HTML acquired tags to control fonts, alignment, etc.
 * The result is a markup language that does both, but is very messy

Rules for Xhtml bold and italic is //wrong// ... ...
 * XHTML elements must be properly nested:
 * XHTML documents must be well-formed
 * Tag names must be in lowercase


 * //All// XHTML elements must be closed

,, 

> * Attribute names must also be in lower case Example:
 * Some browsers require a space before the

Example:
 * Attribute values must be quoted

<!DOCTYPE ....> Is Mandatory
An XHTML document must have an XHTML DOCTYPE declaration. A complete list of all the [|XHTML Doctypes] is found in our HTML Tags Reference. The, , , and elements must also be present, and the xmlns attribute in , must specify the xml namespace for the document. The example below shows an XHTML document with a minimum of required tags: Example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Title of document

......

How to Convert from HTML to XHTML

 * 1) Add an XHTML <!DOCTYPE> to the first line of every page
 * 2) Add an xmlns attribute to the html element of every page
 * 3) Change all element names to lowercase
 * 4) Close all empty elements
 * 5) Change all attribute names to lowercase
 * 6) Quote all attribute values