Web Design

(Nancy Kaufman) #1

26


Declare Your Document Type


3 If necessary, press to
create a new line above the


tag.

4 Type the appropriate
document type declaration.


● For XHTML Transitional, type
<!DOCTYPE html
PUBLIC “-//W3C//DTD
XHTML 1.0
Transitional//EN”
“http://www.w3.org/
TR/xhtml1/DTD/
xhtml1-transitional.
dtd”>.

1 Open an HTML document.


2 Click at the top of your
document.


Declare Your Document Type


B


efore a browser can correctly render your HTML, it needs to know what version of the language
you are using. Both HTML and XHTML support three subsets or flavors: Strict, Transitional,

and Frameset. You can set this version in your document by adding a document type declaration,


or DOCTYPE. This special code, which is not an HTML tag, goes at the very top of your document;


in fact, some browsers may render your page incorrectly if any code, including even a blank line,


appears before the DOCTYPE. Most modern sites use the Transitional version of XHTML.


1


2


4

Free download pdf