Basic layout in HTML

Quick Hands-on

Try to complete the following tasks in the below CodePen editor:

  • Add another <h1>` tag with content “Learning HTML”.
  • Add <p> tag below above <h1> tag with content “I am learning HTML and having fun.”

See the Pen HTML Basics - Basic Layout and Hello World by (@) on CodePen.

Important points to remember

  • The first line is declaration and tells the browser what type of document it is.
  • The <html> tag contains two basic tags <head> and <body>.
  • <h1> tag is used to create the heading.
  • <p> tag is to create a paragraph.
  • Go Live Server extension helps to view the live version of HTML page.