← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 92 · 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>My best friend</h1>
    <p>My best friend</p>
    <p>Fun facts</p>
    <h2>Fun facts</h2>
    <p>Rain today</p>
  2. 2.True or false: a code editor sends pages over the net. (a) False (b) True
  3. 3.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  4. 4.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) quiz.html (d) games.html
  5. 5.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
  6. 6.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) School news (b) Take the quiz (c) href (d) art.html
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  9. 9.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
  10. 10.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  11. 11.True or false: in <img>, alt names the picture file. (a) True (b) False
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red<br>Birds sing</p>
  13. 13.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <h3>Our school trip</h3>
    <p>My pets</p>
  14. 14.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <ul>
  15. 15.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <h3>My pets</h3>
  16. 16.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  17. 17.🔍 One closing tag is missing. Which one?
    <strong>Fun facts</strong>
    <h3>My best friend</h3>
    <h2>Rain today
    (a) </i> (b) </strong> (c) </h2> (d) </h3>
  18. 18.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) has an address bar (d) opens web pages for us
  19. 19.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) My drawings (c) Riya’s Recipes (d) body
  20. 20.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  21. 21.🔠 Are headings shown in bold by default? (a) No (b) Yes
  22. 22.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
  23. 23.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    (a) The red kite (b) Fun facts (c) My best friend (d) Our school trip
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h4>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
  25. 25.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Good morning!</h2>
    <h2>Good morning!</h2>
    <p>The red kite</p>
    <p>Good morning!</p>
  26. 26.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.Which of these is an empty tag? (a) <li> (b) <title> (c) <b> (d) <img>
  28. 28.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
  29. 29.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
  30. 30.🏷️ Which is the closing tag for <em>? (a) <em> (b) <\em> (c) <em/> (d) </em>
  31. 31.Which of these is a closing tag? (a) <b> (b) <body> (c) </body> (d) <li>
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
  33. 33.True or false: in <img>, src shows if the image fails. (a) False (b) True
  34. 34.Which of these is true of a web server? (a) saves our .html files (b) answers page requests (c) opens web pages for us (d) shows line numbers
  35. 35.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  36. 36.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) speed (d) sound
  37. 37.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="150">
  39. 39.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  40. 40.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt

Answer key

  1. 2
  2. False
  3. an opening tag
  4. news.html
  5. 2
  6. in the body
  7. School news
  8. numbers
  9. <h1>
  10. a paragraph
  11. False
  12. 3
  13. 2
  14. <ul>
  15. 2
  16. an opening tag
  17. </h2>
  18. is where we type code
  19. My drawings
  20. a line across the page
  21. Yes
  22. the body
  23. Fun facts
  24. <h1>
  25. 3
  26. has a closing tag
  27. <img>
  28. 2
  29. <h2>
  30. </em>
  31. </body>
  32. 2
  33. False
  34. answers page requests
  35. <ol>
  36. structure
  37. height
  38. 150
  39. True
  40. alt

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