Lesson 2: Adding Content with HTML Tags

Headings

Use headings (<h1> to <h6>) to organize your content by importance.

Example:

<h1>Main Title</h1>
<h2>Subheading</h2>
<h3>Smaller Subheading</h3>

Paragraphs

Wrap text in <p> tags to create paragraphs.

Example:

<p>This is a paragraph of text that provides information about the topic.</p>

Lists

  1. Ordered List (<ol>): Items are numbered.
  2. Unordered List (<ul>): Items are bulleted.

Example:

<h2>Steps to Make Coffee</h2>
<ol>
  <li>Boil water.</li>
  <li>Add coffee grounds to a filter.</li>
  <li>Pour hot water over the grounds.</li>
</ol>

<h2>Shopping List</h2>
<ul>
  <li>Milk</li>
  <li>Eggs</li>
  <li>Butter</li>
</ul>

Links

Use <a> tags to create hyperlinks.

Example:

<p>Visit <a href="https://www.example.com" target="_blank">Example Website</a> for more information.</p>

Images

Use <img> to add images. Always include the alt attribute for accessibility.

Example:

<img src="coffee.jpg" alt="A cup of coffee" width="300">