|
Doctype declaration appears at the top of the html document to tells the browser which version of HTML or Xhtml is used and how to display the page. Other versions may include HTML 4.01. This description is placed before the <html> tag or the first line on the page.
XHTML 1.0 has three versions of the declaration. The doctype sets the rules and regulations for using HTML and is required to validate the document for the correct syntax.
W3C HTML Validation Service - http://validator.w3.org/ XHTML 1.0 transitional is the version used in these courses.
|
- XHTML 1.0 Strict
-
Use this declaration when the HTML coding is free of any deprecated tags.
The layout is accomplished with W3C's Cascading Style Sheet (CSS) language.
The text formatting including fonts, color, size and alignment uses CSS language.
<!DOCTYPE HTML PUBLIC "//W3C//DTD Xhtml 1.0 Strict//EN"
"http://www.w3.org/1999/xhtml"
<html xmlns="http://www.w3/org/1999/xhtml" xml:lang-"en">
|
|
XHTML 1.0 Transitional The XHTML 1.0 Trasitional is similar to HTML 4.0 may include some deprecated tags and uses CSS but does not include frame-related markup.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitonal.dtd">
|
XHTML 1.0 FramsetThis declaration is used when the web page contains frames which divides the browser window into two or more frames.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-frameset.dtd">
|
Quirk Mode and Standard Mode (IE only) Use the following declaration to force IE browser to adopt the CSS interpretation of the box model styles.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE HTML PUBLIC "//W3C//DTD Xhtml 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-strick.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|