Lesson 4 of 17

Elements, tags & attributes

Elements, tags & attributes

HTML is made of elements, written with tags. Most have an opening and closing tag wrapping content: <p>Hello</p>. Attributes add information inside the opening tag.

See it run:

Try it Yourself
Loading editor…
Result

Key points

  • An element = opening tag + content + closing tag.
  • Attributes (like href, src, alt) go in the opening tag.
  • Common tags: <h1>–<h6>, <p>, <a>, <img>, <ul>/<li>.

Try it: change the link text and the image size (/200 → /300).

Q&A · 0

Enrol to ask questions and join the discussion.

No questions yet — be the first to ask.