Simple HTML Document
The following is an example of a HTML document.
<!DOCTYPE html> <html> <head> <title>This is document title</title> </head> <body> <h1>This is a heading</h1> <p>Document content goes here.....</p> </body> </html>
HTML Tags
HTML Document Structure
HTML document structure −
<html> <head> Document header related tags </head> <body> Document body related tags </body> </html>
In following chapters, we will look at all of the header and body tags, but for now, let's look at the document declaration tag.
The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration.
<!DOCTYPE html>There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE html> tag along with other HTML tags.