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.
Evaluate yourself
Which of the following is the correct doctype for HTML5 document?
1. <html5 doctype>
2. <!DOCTYPE HTML>
3. <!HTML doctype>
The <title> tag is used to add title for the document.
1. true
2. false