Attributes — Quiz

Answer all 5 questions, then submit. You need 60% to pass. Log in to save progress.

Question 1
Where do attributes go?
A Inside the closing tag
B Inside the opening tag
C Between the tags, as content
D In a separate file
Question 2
Which attribute gives an image its text description?
A src
B title
C alt
D href
Question 3
What is the key difference between id and class?
A id is for CSS, class is for JavaScript
B id must be unique on the page; class can be reused
C class must be unique; id can be reused
D There is no difference
Question 4
Which attribute sets where a link points?
A src
B href
C link
D to
Question 5
Why should attribute values always be wrapped in quotes?
A It makes the page load faster
B Values containing spaces break without quotes
C Browsers reject unquoted HTML entirely
D It changes the colour of the text