← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 789 · 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 address opens when you click this link?
    <a href="news.html">About us</a>
    (a) news.html (b) About us (c) games.html (d) quiz.html
  2. 2.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
  3. 3.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) turns HTML into a page (d) saves our .html files
  4. 4.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
  5. 5.Which of these has a closing tag? (a) <b> (b) <img> (c) <meta> (d) <hr>
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) width (b) cake.jpg (c) A happy dog (d) Birthday cake
  7. 7.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  8. 8.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  9. 9.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  10. 10.📋 What number does the browser show next to “Orange”?
    <ol start="4">
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
  12. 12.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  13. 13.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
  15. 15.True or false: a web browser shows line numbers. (a) True (b) False
  16. 16.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) maths.html (b) art.html (c) Play games (d) https://example.com
  17. 17.True or false: in <img>, src is read by screen readers. (a) False (b) True
  18. 18.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
  19. 19.🔍 Which is the odd one out? (a) saves our .html files (b) shows pages from the web (c) is where we type code (d) shows line numbers
  20. 20.True or false: in <img>, src tells which image to load. (a) True (b) False
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A red kite (b) tiger.jpg (c) width (d) A tiger asleep
  22. 22.True or false: <ul> is an ordered list. (a) True (b) False
  23. 23.Which of these is true of a code editor? (a) answers page requests (b) is where we type code (c) turns HTML into a page (d) shows pages from the web
  24. 24.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  25. 25.True or false: a web server answers page requests. (a) True (b) False
  26. 26.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
  27. 27.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  28. 28.🔍 One closing tag is missing. Which one?
    <em>Cricket is fun.
    <u>Hello, world!</u>
    <p>My pets</p>
    (a) </em> (b) </h2> (c) </u> (d) </p>
  29. 29.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
  30. 30.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  31. 31.💬 Does the browser show comments on the page? (a) No (b) Yes
  32. 32.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
  33. 33.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) </head> (c) </html> (d) <!DOCTYPE html>
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Stars shine</p>
  35. 35.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Maths fun (b) Art corner (c) about.html (d) href
  36. 36.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
  37. 37.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
  38. 38.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🔍 One closing tag is missing. Which one?
    <h1>Cricket is fun.</h1>
    <strong>The red kite
    <u>Rain today</u>
    (a) </h1> (b) </p> (c) </u> (d) </strong>
  40. 40.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>

Answer key

  1. news.html
  2. src
  3. turns HTML into a page
  4. <h1>
  5. <b>
  6. Birthday cake
  7. starts a new line
  8. 2
  9. True
  10. 6
  11. <h6>
  12. a web server
  13. href
  14. <h2>
  15. False
  16. https://example.com
  17. False
  18. a plain text editor
  19. shows pages from the web
  20. True
  21. A tiger asleep
  22. False
  23. is where we type code
  24. <h5>
  25. True
  26. </p>
  27. No
  28. </em>
  29. alt
  30. bullets
  31. No
  32. <h6>
  33. <!DOCTYPE html>
  34. 3
  35. Maths fun
  36. 2
  37. 1
  38. in the head
  39. </strong>
  40. <img>

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