Tuesday, 29 April 2014

HTML DOCUMENT TYPE DECLARATION

Hi friends! As you now in the previous post we share the basic of html tags and i think you know something about html tags. Today we take step toward the html declaration don't worry  i explain it briefly.


What is document type declaration?

·        Doc type declaration is a kind of instruction to tell the web browser which version of html we are using.

·        In html we use document type declaration refer to DTD (document type definition) because html based on SGML. The DTD indicate the rule of markup languages.

·        With document type declaration browser understand how to show the content on webpage.

·        Always try to use document type declaration and tell the browser how to show the content on webpage.

TYPES OF DECLARATION;
There are three types of declaration in html and xhtml.

1.     Strict
2.     Transitional
3.     Frameset

DOCUMENT TYPE DECLARATION IN HTML(4.01)
STRICT
This type of declaration consists of html element and attributes, but does not include presentational or deprecated elements. Frameset not supported in this type of declaration.
                  
           < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4.01//EN"
              "http://www.w3.org/TR/html4/strict.dtd"
TRANSITIONAL;
 This type of declaration consists of html element and also including presentational or deprecated elements. Frameset not supported in this document type declaration.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
FRAMESET
This type of declaration consists of html element and attributes, including presentation and deprected elements. Framset is supported in this declaration.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

 
DOCUMENT TYPE DECLARATION IN XHTML (1.0)


STRICT
This type of declaration consists of html element and attributes, but does not include presentational or deprecated elements. Frameset not supported in this type of declaration.
It is important to write in well-formed xml.
                  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
TRANSITIONAL;
 This type of declaration consists of html element and also including presentational or deprecated elements. Frameset not supported in this document type declaration.
It is important to write in well-formed xml.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

FR AMESET
This type of declaration consists of html element and attributes, including presentation and deprecated elements. Frameset is supported in this declaration.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> 

FINAL WORDS
friend i think now you get it how the declaration and why the declaraton use in html document. please visit us regularly and share our post with your post with your friend and support us.

0 comments:

Post a Comment