HTML: / Home / DocumentTag

The Document Element

The first and main Element in an HTML Document is the Document Element. It begins with the <html> tag and ends with the </html> tag.

  <!DOCTYPE html>
  <html lang="en">
    
  </html>

There is only one Document Element for each document and it contains all the other elements and text in that document. Elements and text inside an element are usually indented two spaces to make it easier to see what belongs to that element.

The Begin tag can contain additional information about the element. This information is called an "Attribute".

An Attribute has two parts: the Attribute name and the Attribute value separated with an "=" sign.
Notice that the Attribute value is enclosed in quotes.

The Document (html) begin tag has one required attribute. This is the Language attribute. The "lang" attribute value contains the language ID. For english the Language attribute value is "en".

More Information

More about Files

<- HTMLTags            Body ->
6DocumentTag