Listen to the Blog
Master text structure and formatting in HTML for readable web pages.
Headings in HTML
Headings define the hierarchy of content on a page:
- <h1> Main page title
- <h2> Section headings
- <h3> Subsections
- <h4>, <h5>, <h6> Smaller subsections
Welcome to My Website
About Me
Skills
Frontend Development
Best Practices:
- Only one <h1> per page
- Use headings in order (h1 → h2 → h3…)
- Helps with SEO and accessibility
Paragraphs
The HTML <p> element defines a paragraph. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.
This is a paragraph introducing myself on the website.
HTML paragraphs automatically create space between lines.
Text Formatting Tags
HTML offers several tags for emphasis and meaning
Bold / Strong
Italics / Emphasis
Inline Code / Monospace
console.log('Hello');Line Breaks & Horizontal Rules
Combining Headings and Paragraphs
Example of a simple content section:
My Blog
Welcome to my blog where I share web development tips.
Latest Posts
Check out my latest articles about HTML, CSS, and JavaScript.
This creates a clear and readable structure for users and search engines.