HTML page structure

HTML page structure

Every HTML page is divided into two sections...

  1. Head Section
  2. Body Section

Head Section

This is a section that is actually not visible to the users on the web page, but it helps the content on how to display the content.

It is used to write the title, meta, script, style, etc.

Body Section

This is a section that is actually visible on the web page.

Creating your first html page

<!doctype html>
                      <title>My First Web page</title>
                     Welcome!!! in the world of web.

Example Explained

  1.  <!doctype html> represents, which HTML version you are using. For HTML-5 doctype is as written. Before HTML-5 doctype is too complicated. HTML-5 simplified doctype.
  2. Every HTML page starts with <html></html> tag.
  3. Because each HTML page have head section and body section, which is represented by <head></head> and <body></body> tag respectively.
  4. <head></head> section contains, <title></title> tag, which reprents the page title, shown on the title bar.
  5. <body></body> tag contains the actual content of the page.

How to run the web page

  1. To run the web page, save your web page with the .html extension, suppose you saved above page as first.html.
  2. To run the web page, open your saved page in the browser.

Create your first html page video tutorial