Did you find this useful?
Socialize it today.

HTML Html Element

Sunday, February 05, 2012

Within an HTML page, there is a very important element called "html". The <html> tag instructs the browser that this is an HTML document. The <html> element is also known as the root element. The <html> element is the container for all other HTML elements in the html document except for the <!DOCTYPE> declaration. All other html elements are contained within a start and an end <html> tag as shown in the following example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <title>Computers R Us</title>
    <meta name="description" content="Get Computers, servers and laptops on Sale!!!" />
    <meta name="keywords" content="computers,servers,laptops" />
    <link href="styles/master.css" rel="stylesheet" type="text/css" />
    <style type="text/css">table {border:0px solid black;}</style>
    <script type="text/javascript">..content..</script>
    <h1>Main heading</h1>

Required Attributes

If the DOCTYPE is set to XHTML, then the xmlns attribute is required. For HTML, it is invalid.  The required attribute is added as shown in this example:
<html "xmlns=http://www.w3.org/1999/xhtml">

xmlnshttp://www.w3.org/1999/xhtmlSpecifies the namespace to use only for XHTML documents.STF

Optional Attributes

dirrtl, ltrSpecifies the text direction for the content in an elementSTF
langlanguage_codeSpecifies a language code for the content in an elementSTF
xml:langlanguage_codeSpecifies a language code for the content in an element, in XHTML documentsSTF

Please help us spread the word by socializing it today!

email contact us

Did you find something wrong with the information on this page? Please take a moment to report it to us so that we can continue to improve the quality of the information on this site. Click here to report an issue with this page.

Recommended Books & Training Resources

Creating Web Pages Simplified HTML CSS and JavaScript Editor HTML CSS: The Complete Reference