Doc. Type Definition

If you wish to create web pages that have valid XHTML markup controlled by CSS, the first thing you need to do to be sure you're going to get what you want, is to determine DTD (Document Type Definition) for your document..

Incomplete or incorrect DTD can be a cause for lot of problemms in CSS. You can view here how the correct and complete DTD should be looking:

[b]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1
/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999 /xhtml">[/b]


This was an example of Transitional XHTML 1.0 DTD, which is the most used today. A list of all valid DTD that you can use can be found here.

If you don't use correct and exact DTD, you can forget all about pixel-perfect design.


Valid XHTML 1.0 Transitional

PopArt STUDIO - XHTML

     

 


What is XHTML

 

XHTML is the new, cleaner and more precise version of HTML, made by combining HTML 4.01 and XML, taking the elements from HTML and the sintax from XML. It is almost identical to HTML 4.01, so there's not a lot of changes. XHTML was created to replace HTML completely.

W3C recommends using XHTML sice January 2000. That means it is stable and checked by people from W3C organisation.

Generally, the most of today web pages on World Wide Web was written in "bad" HTML code, and XHTML is the one that prohibits "bad" coding. The code must be 100% correct and has to respect certain rules.

On today's market you havea lot of browsers, some of them are made for computers, some of them for mobile phones, and some of them for pocket computers. These last two have no resources nor power to interpreta "bad" markup.

That is why was created a markup that can be used today (PCs) and also that can be used in the future (mobile phones and pocket computers). That is one more reason why the XHTML was created, and that is the reason to start using it right away.

More about XHTML (EXtensible Hyper Text Markup Language) you can read at good old W3C-u.