← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 544 · 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 pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="300">
  2. 2.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <h1> (d) <style>
  3. 3.True or false: <table> goes in the body. (a) False (b) True
  4. 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  5. 5.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
  6. 6.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) contact.html (b) about.html (c) games.html (d) Play games
  7. 7.Which of these is true of a web browser? (a) stores a website’s files (b) hosts websites online (c) saves our .html files (d) opens web pages for us
  8. 8.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <style> (d) <link rel="stylesheet">
  9. 9.Which of these is an empty tag? (a) <title> (b) <b> (c) <hr> (d) <h1>
  10. 10.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  11. 11.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="400">
    (a) width (b) A red kite (c) Map of India (d) kite.png
  13. 13.True or false: in <img>, height shows if the image fails. (a) True (b) False
  14. 14.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) href (b) quiz.html (c) Visit the site (d) Maths fun
  15. 15.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  17. 17.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>Rain today</p>
    <h2>Our school trip</h2>
    <p>I love mangoes.</p>
  18. 18.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  19. 19.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
  20. 20.True or false: <ul> goes in the body. (a) True (b) False
  21. 21.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  22. 22.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  23. 23.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="150">
  25. 25.📋 What number does the browser show next to “Papaya”?
    <ol start="3">
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  26. 26.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
  27. 27.🔍 One closing tag is missing. Which one?
    <h3>I love mangoes.
    <b>Fun facts</b>
    <em>Good morning!</em>
    (a) </small> (b) </b> (c) </h3> (d) </em>
  28. 28.True or false: <li> is one item of a list. (a) False (b) True
  29. 29.🔗 Where does this link open?
    <a href="maths.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  30. 30.True or false: <h1> is an empty tag. (a) True (b) False
  31. 31.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  32. 32.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  33. 33.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) Play games (b) Take the quiz (c) href (d) quiz.html
  34. 34.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Planets (c) Try this poha. (d) Cricket Club
  35. 35.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) width (d) alt
  36. 36.True or false: in <img>, src sets how wide it is. (a) True (b) False
  37. 37.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) quiz.html (c) games.html (d) news.html
  38. 38.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.🔠 Are headings shown in bold by default? (a) Yes (b) No
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Kites fly high</p>

Answer key

  1. 300
  2. <h1>
  3. True
  4. <ul>
  5. Language
  6. games.html
  7. opens web pages for us
  8. <img>
  9. <hr>
  10. <h1>
  11. No
  12. A red kite
  13. False
  14. Visit the site
  15. an opening tag
  16. <a href="about.html">
  17. 4
  18. <li>
  19. a slash /
  20. True
  21. href
  22. a web browser
  23. a line across the page
  24. 150
  25. 6
  26. <h1>
  27. </h3>
  28. True
  29. in the same tab
  30. False
  31. a code editor
  32. <h1>
  33. Take the quiz
  34. Planets
  35. height
  36. False
  37. news.html
  38. an empty tag
  39. Yes
  40. 3

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