0
0
HTMLmarkup~10 mins

Self-closing tags in HTML - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to correctly write a self-closing image tag.

HTML
<img src="image.jpg" alt="A photo" [1]>
Drag options to blanks, or click blank then click option'
A>
B/>
C</img>
D<img>
Attempts:
3 left
💡 Hint
Common Mistakes
Using just > without the slash
Trying to write a separate closing tag like
2fill in blank
medium

Complete the code to correctly write a self-closing line break tag.

HTML
<br[1]>
Drag options to blanks, or click blank then click option'
A/>
B>
C</br>
D<br>
Attempts:
3 left
💡 Hint
Common Mistakes
Writing a closing tag like
Omitting the slash in self-closing tag
3fill in blank
hard

Fix the error in the self-closing input tag.

HTML
<input type="text" name="username" [1]>
Drag options to blanks, or click blank then click option'
A</input>
B<input>
C/>
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using just > without slash
Trying to write a closing tag like
4fill in blank
hard

Fill both blanks to correctly write a self-closing meta tag with charset attribute.

HTML
<meta charset=[1][2]>
Drag options to blanks, or click blank then click option'
A"UTF-8"
B'UTF-8'
C/>
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using single quotes instead of double quotes
Omitting the slash in the self-closing tag
5fill in blank
hard

Fill all three blanks to write a self-closing link tag for a stylesheet.

HTML
<link rel=[1] href=[2] [3]>
Drag options to blanks, or click blank then click option'
A"stylesheet"
B"styles.css"
C/>
D"text/css"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes around attribute values
Not self-closing the tag with a slash