LESSON 4
HTML Elements and Tags
Learning objective: Understand how elements, tags, and attributes fit together.
Understand
HTML is made of elements, and elements are written with tags.
Most elements have an opening tag, some content, and a closing tag, like <p>Hello</p>. Some elements are empty and self-close, like <br>. Tags can also carry attributes — extra information written as name='value' inside the opening tag.
Analogy: An element is like a labelled box: the tags are the label, and the content is what is inside.
See It in Action
This link element has content and an attribute:
<a href="https://bynteq.com">Visit Bynteq</a><a> is the element, href is an attribute giving the destination, and 'Visit Bynteq' is the visible content between the tags.Try It Yourself
- Write a
<p>element with some text. - Add a
titleattribute to it, liketitle='hello'. - Hover over the text in the browser to see the tooltip.
Quick Quiz
Where do attributes go?
Challenge
Create one element that uses at least one attribute and explain what the attribute does.
Success condition: You can point to the opening tag, content, closing tag, and attribute in your own element.
Lesson Complete
You answered correctly and completed the required practice. Your progress has been saved on this device.
Continue to next lesson →