Recall & Review
beginner
What is an attribute in HTML?
An attribute in HTML is extra information added inside a tag to give more details about an element. It usually comes in name="value" pairs.
Click to reveal answer
beginner
Give an example of an HTML attribute.
In <a href="https://example.com">Link</a>, the attribute is href="https://example.com" which tells the link where to go.
Click to reveal answer
beginner
Can attributes change how an element looks or works?
Yes, attributes can change behavior or appearance. For example, the 'src' attribute in an <img> tag tells the browser which image to show.
Click to reveal answer
beginner
Are attributes always required in HTML tags?
No, attributes are optional. Some tags work fine without attributes, but attributes add important details or settings.
Click to reveal answer
beginner
How do you write multiple attributes in one HTML tag?
You write them separated by spaces, like <input type="text" placeholder="Name"> where 'type' and 'placeholder' are two attributes.
Click to reveal answer
What does an attribute in an HTML tag do?
✗ Incorrect
Attributes add extra information inside an HTML tag to describe or control the element.
Which of these is a valid attribute in an <a> tag?
✗ Incorrect
The 'href' attribute tells the link where to go. 'src' is for images, 'alt' is for image descriptions, and 'value' is for form inputs.
How do you write multiple attributes in one tag?
✗ Incorrect
Multiple attributes are written separated by spaces inside the tag.
Are attributes always required in HTML tags?
✗ Incorrect
Attributes are optional and used when extra information or control is needed.
What is the correct syntax for an attribute?
✗ Incorrect
Attributes are written as name="value" with quotes around the value.
Explain what an HTML attribute is and why it is useful.
Think about how you tell a friend extra details about something.
You got /3 concepts.
Describe how to write multiple attributes inside an HTML tag with an example.
Imagine listing features of a product separated by spaces.
You got /2 concepts.