← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 630 · 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="games.html">School news</a>
    (a) School news (b) contact.html (c) games.html (d) about.html
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!
    line 2: <b>My pets</b>
    line 3: <p>Cricket is fun.</p>
    (a) line 2 (b) line 3 (c) line 1
  3. 3.Which of these is true of a code editor? (a) has an address bar (b) is where we type code (c) opens web pages for us (d) sends pages over the net
  4. 4.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) alt (d) width
  5. 5.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
  7. 7.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  8. 8.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
  9. 9.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
  10. 10.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) about.html (b) quiz.html (c) Visit the site (d) games.html
  11. 11.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Space Facts (c) Thanks for visiting. (d) All about me
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Kites fly high<br>Roses are red<br>Rivers flow</p>
  13. 13.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  14. 14.Which of these is true of a web browser? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) opens web pages for us
  15. 15.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) contact.html (c) About us (d) Play games
  17. 17.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Good morning!</p>
    <h3>Cricket is fun.</h3>
    <h4>Cricket is fun.</h4>
    <p>Our school trip</p>
  18. 18.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) Play games (b) About us (c) href (d) quiz.html
  19. 19.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
  20. 20.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
  21. 21.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) maths.html (b) Visit the site (c) href (d) Maths fun
  22. 22.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
  24. 24.🔢 In a basic web page file, which comes first: “<head>” or “</html>”? (a) </html> (b) <head>
  25. 25.📋 What number does the browser show next to “Mango”?
    <ol start="7">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  26. 26.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  27. 27.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) Contact us (b) About us (c) maths.html (d) href
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Stars shine</p>
  29. 29.Which of these is a closing tag? (a) <h1> (b) <li> (c) <b> (d) </p>
  30. 30.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <table> (d) <meta charset="utf-8">
  31. 31.Which of these goes in the body? (a) <style> (b) <title> (c) <img> (d) <meta charset="utf-8">
  32. 32.💬 Does the browser show comments on the page? (a) Yes (b) No
  33. 33.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) maths.html (b) Maths fun (c) href (d) Art corner
  34. 34.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  35. 35.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  36. 36.🔠 Are headings shown in bold by default? (a) Yes (b) No
  37. 37.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) Contact us (b) about.html (c) href (d) About us
  38. 38.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  40. 40.🔍 One closing tag is missing. Which one?
    <strong>Rain today</strong>
    <b>The red kite
    <p>Fun facts</p>
    (a) </strong> (b) </small> (c) </b> (d) </p>

Answer key

  1. games.html
  2. line 1
  3. is where we type code
  4. alt
  5. <ul>
  6. 2
  7. <h1>
  8. <!DOCTYPE html>
  9. starts a new line
  10. quiz.html
  11. All about me
  12. 5
  13. <html>
  14. opens web pages for us
  15. 2
  16. Play games
  17. 3
  18. Play games
  19. src
  20. -->
  21. Visit the site
  22. <h1>
  23. 1
  24. <head>
  25. 8
  26. <!--
  27. About us
  28. 5
  29. </p>
  30. <table>
  31. <img>
  32. No
  33. Maths fun
  34. <h6>
  35. on the browser tab
  36. Yes
  37. About us
  38. a paragraph
  39. 50
  40. </b>

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