Course Content
Section 1: Introduction
You can copy this EXACT structure directly into Tutor LMS → Courses → Curriculum.
0/2
HTML Basics
You can copy this EXACT structure directly into Tutor LMS → Courses → Curriculum.
0/2
Test Course

Headings, Paragraphs & Comments in HTML

HTML provides basic elements to structure your content clearly on a webpage. Three of the most commonly used elements are headings, paragraphs, and comments. These elements help organize text, improve readability, and make your code easier to understand.


1. Headings in HTML

Headings are used to define titles and subtitles in a webpage.

✔ Types of Headings

HTML has six levels of headings, from <h1> to <h6>:

  • <h1> → Main title (largest)

  • <h2> → Sub-title

  • <h3> → Section heading

  • <h4> → Sub-section heading

  • <h5> → Smaller-level heading

  • <h6> → Smallest heading

✔ Example:

 
<h1>Welcome to HTML Tutorial</h1>
<h2>Introduction</h2>
<h3>Basics of HTML</h3>

2. Paragraphs in HTML

Paragraphs are used to display blocks of text.
You can create a paragraph using the <p> tag.

✔ Example:

 
<p>HTML stands for HyperText Markup Language. It is used to create webpages.</p>

Paragraphs automatically add spacing before and after themselves.


3. HTML Comments

Comments are notes you add inside HTML code.
They are ignored by the browser and do not appear on the webpage.

They help you and other developers understand the code later.

✔ Syntax:

 
<!-- This is a comment -->

✔ Example:

 
<!-- Main heading starts here -->
<h1>My Website</h1>

<!-- This is a paragraph about the website -->
<p>This website contains tutorials and quizzes.</p>

Scroll to Top