HTML Basic Examples

Headings, paragraphs, links and images at a glance.

✍️ 3 exercises + code challenge in this lesson

Before going deeper, here is a quick look at the most common HTML elements. Each one is covered in detail in its own lesson.

  • Headings use <h1> to <h6>.
  • Paragraphs use <p>.
  • Links use <a href="...">.
  • Images use <img src="..." alt="...">.
  • Buttons use <button>.

Key Takeaways: HTML Basic Examples

Mastering HTML Basic Examples helps you write clean and reliable HTML code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.

HTML Basic Examples Code Example

HTML
<h1>Welcome</h1>
<p>A short paragraph about our website.</p>
<a href="https://codesintech.com">Visit CodesInTech</a>
<br><br>
<img src="https://picsum.photos/240/120" alt="Sample photo" width="240" height="120">
<br><br>
<button>Click me</button>
Free sign-in required · Google login available

HTML Basic Examples Practice Exercises

Check what you learned in “HTML Basic Examples”.

/ 3 solved
Fill in the blank

Insert the missing tag to create a link.

< href="https://codesintech.com">Visit us</>
✓ Correct! Not quite. Try again.
Multiple choice

Which tag creates the largest heading?

✓ Correct! Not quite. Try again.
Code challenge

Add a button with the text "Click me".

Write the code in the live editor. Your answer is checked automatically.

Free sign-in required · Google login available

to save your exercise progress.
Finished this lesson?
Mark it complete to track your progress.

Stuck on something?

Ask the community in the CodesInTech forum.

Need a developer?

Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.

Explore Our Services