← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 477 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.Which of these is an opening tag? (a) </body> (b) <p> (c) </h1> (d) </b>
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="50">
  3. 3.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
  4. 4.True or false: <style> goes in the body. (a) True (b) False
  5. 5.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Sky is blue<br>Birds sing<br>Rivers flow</p>
  7. 7.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  9. 9.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  10. 10.True or false: <ol> goes inside ul or ol. (a) True (b) False
  11. 11.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  12. 12.True or false: a web browser saves our .html files. (a) False (b) True
  13. 13.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
  14. 14.True or false: <li> is an ordered list. (a) False (b) True
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <strong>My pets
    line 3: <h1>I love mangoes.</h1>
    (a) line 3 (b) line 1 (c) line 2
  16. 16.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  17. 17.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  18. 18.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.
    <em>Hello, world!</em>
    <u>My best friend</u>
    (a) </u> (b) </strong> (c) </em> (d) </i>
  19. 19.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h4>
  20. 20.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <style> (d) <img>
  21. 21.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>Our school trip</p>
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    <p>My best friend</p>
    (a) Our school trip (b) My best friend (c) Good morning!
  24. 24.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  25. 25.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) </strong> (d) <\strong>
  26. 26.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <p> (d) <pic>
  27. 27.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>The red kite</h2>
    <h2>Our school trip</h2>
    <h2>The red kite</h2>
  28. 28.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  29. 29.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  30. 30.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  31. 31.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
  33. 33.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) School news (b) href (c) maths.html (d) Art corner
  34. 34.🔍 One closing tag is missing. Which one?
    <h3>I love mangoes.</h3>
    <em>My best friend</em>
    <small>Hello, world!
    (a) </strong> (b) </h3> (c) </em> (d) </small>
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  36. 36.True or false: HTML on its own can make headings. (a) True (b) False
  37. 37.🔍 Which is the odd one out? (a) colours code to help us (b) shows pages from the web (c) shows line numbers (d) saves our .html files
  38. 38.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) </i> (d) <i/>
  40. 40.True or false: in <img>, src names the picture file. (a) True (b) False

Answer key

  1. <p>
  2. 50
  3. <li>
  4. False
  5. <ul>
  6. 5
  7. has a closing tag
  8. <!DOCTYPE html>
  9. an empty tag
  10. False
  11. on the browser tab
  12. False
  13. 2
  14. False
  15. line 2
  16. <a>
  17. an attribute
  18. </strong>
  19. <h6>
  20. <img>
  21. a code editor
  22. 2
  23. Our school trip
  24. 6
  25. </strong>
  26. <img>
  27. 1
  28. has a closing tag
  29. to leave notes
  30. a web browser
  31. 3
  32. <h1>
  33. Art corner
  34. </small>
  35. 2
  36. True
  37. shows pages from the web
  38. in the body
  39. </i>
  40. True

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids