12.09.2015 Views

Boot Camp

Web Authoring Boot Camp - StudioBast

Web Authoring Boot Camp - StudioBast

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HTML/XHTML Basics<br />

Currently, the normal doctype for new and developing websters to start with is XHTML<br />

1.0 Transitional, which helps browsers assume the web page has been designed using standards<br />

mode. It is also more forgiving that XHTML 1.0 Strict and allows for the occasional<br />

creep in of a gracefully depreciating tag. Designers then often move into XHTML 1.0 Strict,<br />

but you may find it easiest to work into the simple HTML5 doctype as soon as possible.<br />

HTML Tag Namespace<br />

XML namespaces are used for providing uniquely named elements and attributes in an<br />

XML document. They are defined in Namespaces in XML, a W3C recommendation. An<br />

XML instance may contain element or attribute names from more than one XML vocabulary.<br />

If each vocabulary is given a namespace then the ambiguity between identically<br />

named elements or attributes can be resolved.<br />

Because XHTML is a blend of XML and HTML, a namespace is also assumed. While<br />

HTML4 and earlier pages can use just the plain tags, the opening HTML<br />

tag in all XHTML documents uses namespace information. Important validation note:<br />

This opening HTML tag must abut the end of your doctype, not be tabbed down to the<br />

next line in your code. Otherwise, the W3C Validator doesn’t recognize the HTML opening<br />

tag properly, and you will get errors.<br />

<br />

HTML5, however, does not require a stated namespace.<br />

Head Section Charset<br />

A character encoding (charset) is a method of converting bytes into characters, which addresses<br />

the issue of what abstract characters may be part of an HTML document. To validate<br />

or display an HTML/XHTML document, a program must choose a character encoding.<br />

The basic charset is UTF-8, which is compatible with ASCII characters. Because the ISO<br />

character-sets are limited in size, and are not compatible in multilingual environments,<br />

the Unicode Consortium developed the Unicode Standard, which covers all the characters,<br />

punctuations, and symbols in the world. We will focus on UTF-8, especially since it<br />

is also the charset recommended for HTML5.<br />

ISO-8859-1 is also commonly used, since it allows for characters to be used from North<br />

America, Western Europe, Latin America, the Caribbean, Canada, and Africa. However,<br />

it has limits compared to UTF-8.<br />

75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!