Things you want to know about websites


Doctype and Flavors


There are different versions and flavors of Html available. When rendering (running) the markup a broswer needs to know what version or flavor was used to design the page, so that i can run it correctly.

To tell the browser about the version of html we used, we use the Doctype declaration. If you have seen some html documents then you might have noticed the declaration already. It look something like this,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

It looks a bit cumbursome, but we can understand what it means by first looking at the flavors of html.


Both Html and XHTML supports three flavors,


The Strict type is the most standardized. It doesn't allow the use of depracated or presentational elements. Frames are also not allowed.


The Transitional type allows the use of deprecated or presentational elements but frames are not allowed.


The Frameset type is same as transitional but allows the use of Frames.

Doctype Declaration

To define a doctype, we use the <!Doctype> tag on the very first line of code.


The doctype for Xhtml with transitional flavor is written as,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

For other Doctypes you can see Doctype declaration at W3C's website. You don't have to remember this line just copy and paste it with out worrying.

Xhtml Naming Space

If you coding in Html you can just begin by type <html> tag but if you are coding in Xhtml than you should declare a naming space inside <html> tag like,

<html xmlns="">

You can just copy and paste in every document.

Bookmark or Add to Favourites

Next :

Html-Complete Document Example


Html-Document Structure
Html-Basic Document Example

Link to this page :

Copy and paste the following code in an html document to link to this page,