HTML Documents

  1. <html> and </html>: These tags define the root element of the HTML document. All other elements must be placed within these tags.
  2. <head> and </head>: This section contains meta information about the HTML document, such as the title.
    • <title>First Web Page</title>: This tag sets the title that appears in the browser tab or window title bar.
  3. <body> and </body>: This section contains the visible content of the HTML document, including text, images, links, etc.
    • Hello World: This is the text content that will be displayed in the browser.

HTML Syntax

<html>
<head>
<title>First Web Page</title>
</head>
<body>
Hello World
</body>
</html>

Extension to save HTML file

The .html extension is essential when saving an HTML file, as it tells the web browser that the file contains HTML code and should be rendered accordingly.

Scroll to Top