Text Formatting and Styles
Text Formatting and Styles
Text Elements
HTML provides various elements to
structure and format text on a webpage.
Some of the most common text elements
include headings, paragraphs, line
breaks, and horizontal rules.
a. Headings (<h1> to <h6>)
Headings are used to create titles and
subtitles on a webpage. HTML offers six
levels of headings, from <h1> (the
highest or most important level) to <h6>
(the lowest level).
• Example:
b. Paragraphs (<p>)
Paragraphs are used to group sentences
and other elements together in a block of
text. They are the basic building blocks of
text content.
• Example: