← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 644 · 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 is the closing tag for <i>? (a) </i> (b) <\i> (c) <i/> (d) <i>
  2. 2.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  3. 3.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  5. 5.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
  6. 6.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  7. 7.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) colours code to help us (d) sends pages over the net
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) map.png (b) Map of India (c) Birthday cake (d) width
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog
  10. 10.Which of these is a closing tag? (a) <li> (b) <title> (c) <h1> (d) </h1>
  11. 11.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  12. 12.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  13. 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
  14. 14.True or false: <title> is an empty tag. (a) False (b) True
  15. 15.🔗 Which address opens when you click this link?
    <a href="art.html">Maths fun</a>
    (a) news.html (b) Maths fun (c) quiz.html (d) art.html
  16. 16.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
  17. 17.Which of these is a closing tag? (a) <b> (b) </li> (c) <h1> (d) <li>
  18. 18.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) alt (d) width
  19. 19.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <h2>Hello, world!</h2>
    <h2>I love mangoes.</h2>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
  21. 21.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
  22. 22.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
  23. 23.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) About us (b) maths.html (c) href (d) Contact us
  24. 24.Which of these has a closing tag? (a) <hr> (b) <b> (c) <img> (d) <meta>
  25. 25.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  26. 26.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  27. 27.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  28. 28.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  29. 29.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>The red kite</h2>
    <p>Our school trip</p>
  30. 30.Which of these is an opening tag? (a) </h1> (b) </li> (c) </p> (d) <li>
  31. 31.True or false: in <img>, alt describes the picture. (a) True (b) False
  32. 32.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  33. 33.Which of these is an empty tag? (a) <p> (b) <li> (c) <br> (d) <b>
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) I like to read. (c) Cricket Club (d) index.html
  35. 35.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  36. 36.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
  37. 37.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
  38. 38.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) Art corner (c) School news (d) href
  39. 39.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  40. 40.🔗 Where does this link open?
    <a href="art.html">Art corner</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. </i>
  2. an opening tag
  3. 2
  4. bullets
  5. <h1>
  6. to leave notes
  7. sends pages over the net
  8. Map of India
  9. Birthday cake
  10. </h1>
  11. <a href="about.html">
  12. 3
  13. a slash /
  14. False
  15. art.html
  16. Markup
  17. </li>
  18. width
  19. 3
  20. 1
  21. 2
  22. src
  23. About us
  24. <b>
  25. False
  26. href
  27. a web browser
  28. <
  29. 2
  30. <li>
  31. True
  32. in the same tab
  33. <br>
  34. Cricket Club
  35. in a new tab
  36. <h1>
  37. <h1>
  38. Art corner
  39. <ol>
  40. in the same tab

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