Beginner · HTML basics · topic 6 of 64 · 25 min
Headings, paragraphs and text
Explanation
Headings: the outline of the page
HTML has six heading levels, from <h1> to <h6>. Use one <h1> for the main title of the page. Use <h2> for big sections and <h3> for parts inside an <h2> section. Do not skip levels, for example jumping from <h2> straight to <h4>.
<h1>Class 12 Board Results 2026</h1>
<h2>How to check your result</h2>
<p>Enter your roll number and date of birth.</p>
<h2>Re-checking</h2>
<h3>Who can apply</h3>
<p>Any student who is not happy with a mark.</p>
<h3>Fees</h3>
<p>Rs 500 per subject.</p>Paragraphs and whitespace
Wrap each paragraph in <p>. Whitespace means spaces, tabs and new lines. The browser collapses whitespace: any run of spaces and new lines becomes a single space. So pressing Enter in your code does not start a new line on the page.
The <br> element forces a line break inside text where the line matters, such as a postal address or the lines of a poem. Use it sparingly. Do not use <br><br> to make space between paragraphs; use separate <p> elements and CSS margin instead.
Meaning, not looks: strong and em
| Tag | Meaning | Default look |
|---|---|---|
| <strong> | Very important, serious or urgent | Bold |
| <em> | Stress that changes how a sentence is read | Italic |
| <b> | Draws attention, with no extra importance (a keyword) | Bold |
| <i> | A different voice: a technical term or a foreign word | Italic |
Search engines and assistive tools read the tag, not the look. Choose the tag for its meaning. If you only want bold text for decoration, use CSS (font-weight) instead.
Quotes and code
<blockquote cite="https://www.example.org/speech">
<p>Education is the most powerful tool to change a life.</p>
</blockquote>
<p>Use the <code><p></code> tag for paragraphs.</p>
<pre><code>Name: Asha
Marks: 92</code></pre><blockquote> holds a long quote from another source, and <q> holds a short quote inside a sentence. <code> marks a piece of code. <pre> (preformatted) keeps every space and line break exactly as you typed it, so it is the exception to whitespace collapsing.
Character entities
Some characters have a special job in HTML. A < starts a tag and an & starts an entity. An entity is a short code that shows a character safely. Write < for <, > for >, and & for &.
| You write | Page shows | Use it for |
|---|---|---|
| < and > | < and > | Showing a tag as text |
| & | & | Names like Tom & Jerry, or URLs inside text |
| | A space that never breaks | Keeping a number and its unit on one line |
| ₹ (or type ₹) | ₹ | The rupee sign; with UTF-8 you can type it directly |
Watch the lesson
Headings, paragraphs and text · 1/6
Text is most of the web. Let us learn the tags that give text its structure and meaning.
Prefer a video by a teacher? Find free videos on “html headings paragraphs strong em entities tutorial for beginners” on YouTube ↗
In real life: An exam results notice
A university results page has one <h1> with the exam name, an <h2> for each faculty and an <h3> for each course. The last date for re-checking is inside <strong>, because missing it costs students money. The fee line is written as ₹ 500, so the sign and the amount never split on a phone screen, and the address of the exam office uses <br> between its lines.
Practice (0/3 done)
This college notice uses two <h1> headings and no emphasis. Fix it: keep one <h1> ("College Notice"), change "Exam form" into an <h2>, and wrap the last date "25 November" in <strong> inside its paragraph.
Two paragraphs show the wrong thing. In #rule, the text "<h1>" became a real heading: write it with entities so the page shows the tag as text. In #price, show the rupee sign and keep it on the same line as 499 with a non-breaking space, so the page shows "Price: ₹ 499".
Take one page of a newspaper or a school notice. Write its heading outline on paper: the one h1, the h2 sections and any h3 parts. Then mark which words deserve <strong> and which deserve <em>.
Quick quiz
Read more (free)
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.