4.3 SAMPLE HTML DOCUMENT

Note: Save the file with .html or .htm extension. As “myfirstfile .html”
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
• The <!DOCTYPE html> declaration defines this document to be HTML5
• The <html> element is the root element of an HTML page
• The <head> element contains meta information about the document
• The <title> element specifies a title for the document
• The <body> element contains the visible page content
• The <h1> element defines a large heading
• The <p> element defines a paragraph

Web Browsers
The purpose of a web browser (“Chrome, IE, Firefox, Safari, etc”) is to read HTML documents and display them. The browser does not display the HTML tags, but uses them to determine how to display the document:

HTML Sample Page Structure-

1

Licensed under the Creative Commons Attribution Share Alike License 4.0

Made with eXeLearning (New Window)