← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 169 · 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 heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  2. 2.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  3. 3.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  4. 4.Which of these goes in the body? (a) <h1> (b) <title> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  5. 5.🔍 One closing tag is missing. Which one?
    <h3>Our school trip</h3>
    <em>My best friend
    <strong>I love mangoes.</strong>
    (a) </strong> (b) </em> (c) </h3> (d) </u>
  6. 6.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  7. 7.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) About us (b) quiz.html (c) games.html (d) news.html
  9. 9.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
  10. 10.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <h2>Rain today</h2>
  11. 11.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  12. 12.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) art.html
  13. 13.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <p>Good morning!</p>
    line 2: <small>My best friend
    line 3: <h1>Fun facts</h1>
    (a) line 1 (b) line 2 (c) line 3
  15. 15.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  16. 16.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!
    <em>Rain today</em>
    <p>I love mangoes.</p>
    (a) </em> (b) </p> (c) </h1> (d) </h3>
  17. 17.True or false: in <img>, width sets how wide it is. (a) True (b) False
  18. 18.Which of these is true of a web browser? (a) saves our .html files (b) shows pages from the web (c) shows line numbers (d) is where we type code
  19. 19.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
  20. 20.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  21. 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  22. 22.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  23. 23.True or false: <li> is one item of a list. (a) False (b) True
  24. 24.True or false: in <img>, width tells which image to load. (a) False (b) True
  25. 25.📄 Can HTML on its own make a form? (a) No (b) Yes
  26. 26.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
  27. 27.Which of these goes in the head? (a) <h1> (b) <table> (c) <link rel="stylesheet"> (d) <p>
  28. 28.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  31. 31.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) A red kite (b) kite.png (c) cake.jpg (d) map.png
  32. 32.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  33. 33.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  34. 34.Which of these is an empty tag? (a) <h1> (b) <p> (c) <b> (d) <br>
  35. 35.🔗 Where does this link open?
    <a href="art.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  36. 36.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  37. 37.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
  38. 38.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  39. 39.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) href (b) Visit the site (c) Contact us (d) games.html
  40. 40.💬 Does the browser show comments on the page? (a) Yes (b) No

Answer key

  1. <h5>
  2. a line across the page
  3. href
  4. <h1>
  5. </em>
  6. numbers
  7. a closing tag
  8. news.html
  9. width
  10. 3
  11. <!DOCTYPE html>
  12. Maths fun
  13. <h6>
  14. line 2
  15. element
  16. </h3>
  17. True
  18. shows pages from the web
  19. <h6>
  20. 2
  21. Yes
  22. a code editor
  23. True
  24. False
  25. Yes
  26. 1
  27. <link rel="stylesheet">
  28. <ul>
  29. A tiger asleep
  30. 50
  31. kite.png
  32. No
  33. a web server
  34. <br>
  35. in the same tab
  36. in the body
  37. 2
  38. <h5>
  39. Contact us
  40. No

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