Zed-King Institute

    HTML Headings, Paragraph and Bold Text Example

    easyHTML basicsHTML

    The building blocks of every web page: a heading, a paragraph, and text formatting inside it.

    The question

    Create a page with an <h1> heading that says "My Hobbies" and a paragraph (<p>) that says "I live in Kaithal." — the word Kaithal must be bold using <b> or <strong>.

    The code

    index.html

    <h1>My Hobbies</h1>
    <p>I live in <b>Kaithal</b>.</p>

    Result

    How it works

    1. 1<h1> is the main heading; h1 to h6 go from largest to smallest.
    2. 2<p> makes a paragraph — browsers add space above and below it.
    3. 3<b> or <strong> makes text bold; <strong> also tells screen readers the text is important.

    Common mistakes

    • Forgetting a closing tag such as </b>, which makes the rest of the page bold.
    • Using several <br> tags to create space instead of separate paragraphs.

    Now solve a similar question yourself

    A new HTML / CSS / JS question every time, checked instantly.

    Practice questions