← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 973 · 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.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Rain today</h3>
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <h3>Rain today</h3>
  2. 2.True or false: in <img>, src tells which image to load. (a) False (b) True
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <small>My pets
    line 2: <strong>Rain today</strong>
    line 3: <h1>Good morning!</h1>
    (a) line 2 (b) line 1 (c) line 3
  4. 4.📄 Can HTML on its own make tables? (a) No (b) Yes
  5. 5.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  6. 6.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  7. 7.🔍 One closing tag is missing. Which one?
    <h1>Good morning!
    <b>The red kite</b>
    <h3>Rain today</h3>
    (a) </h3> (b) </h1> (c) </u> (d) </b>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog
  9. 9.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.True or false: <input> has a closing tag. (a) True (b) False
  11. 11.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) School news (b) Art corner (c) href (d) contact.html
  12. 12.True or false: a web browser saves our .html files. (a) True (b) False
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
  14. 14.Which of these is an empty tag? (a) <li> (b) <title> (c) <hr> (d) <h1>
  15. 15.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  17. 17.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  18. 18.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  19. 19.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <img>
  20. 20.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red</p>
  22. 22.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) Art corner (b) href (c) art.html (d) Maths fun
  23. 23.True or false: <ul> goes in the head. (a) True (b) False
  24. 24.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  25. 25.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  26. 26.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  27. 27.Which of these is true of a code editor? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) has an address bar
  28. 28.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  29. 29.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h6> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h6>
  30. 30.True or false: <ul> lists steps in order. (a) True (b) False
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) A red kite (b) width (c) A tiger asleep (d) tiger.jpg
  32. 32.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  33. 33.🔠 Are headings shown in bold by default? (a) Yes (b) No
  34. 34.📋 What number does the browser show next to “Banana”?
    <ol start="2">
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  35. 35.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  36. 36.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  37. 37.Which of these goes in the body? (a) <title> (b) <h1> (c) <link rel="stylesheet"> (d) <style>
  38. 38.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) My drawings (c) Cricket Club (d) Thanks for visiting.
  40. 40.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>

Answer key

  1. 4
  2. True
  3. line 1
  4. Yes
  5. <a href="about.html">
  6. bullets
  7. </h1>
  8. Birthday cake
  9. in the head
  10. False
  11. Art corner
  12. False
  13. 2
  14. <hr>
  15. in the head
  16. href
  17. in the body
  18. 3
  19. <img>
  20. a web server
  21. 4
  22. Maths fun
  23. False
  24. Yes
  25. to leave notes
  26. Yes
  27. is where we type code
  28. 1
  29. <h1>
  30. False
  31. A tiger asleep
  32. <ol>
  33. Yes
  34. 4
  35. Yes
  36. <a>
  37. <h1>
  38. alt
  39. Cricket Club
  40. <ul>

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