HTML Mastery: 6-Day Learning Journey


Topics: HTML | Basic Tags | List | Anchor Tag | Images

Introduction to HTML

Basic HTML Tags

  • Headings (<h1> to <h6>)

    • Used to define headings on a webpage.
    • h1 is the largest (main heading), h6 is the smallest.
    • Search engines give more weight to h1

    Code

    heading example
  • Paragraph (<p>)

    • Used to define blocks of text content.
    • Browsers automatically add spacing before and after a paragraph.

    Code

    heading example
  • Line Break (<br>)

    • Inserts a single line break without starting a new paragraph.

    Code

    heading example
  • Horizontal Rule (<hr>)

    • Creates a horizontal line across the page.
    • Often used to separate sections of content.

    Code

    heading example

  • Lists in HTML

    Ordered List (<ol>)

    Attributes of <ol>:

    1. type → changes numbering style
      • 1 → Numbers (default)
      • A → Uppercase letters
      • a → Lowercase letters
      • I → Roman numerals (uppercase)
      • i → Roman numerals (lowercase)
    2. start → specifies starting number/letter.
    3. reversed → displays numbers in descending order.

    code

    o

    Unordered List (<ul>)

    Attributes of <ul>:

    code

    u

    Description List (<dl>)

    Tags used:

    <dl>
    Defines the list.
    <dt>
    Defines the term.
    <dd>
    Defines the description.

    code

    d

    Anchor Tag (<a>)

  • Used to create hyperlinks.
  • Attributes:

  • href → URL or path of the page to open.
  • target="_blank" → Opens link in a new tab.
  • code


    Image Tag (<img>)

    Important Attributes

    code

    image