← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 780 · 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 paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
  2. 2.Which of these is true of a web server? (a) saves our .html files (b) opens web pages for us (c) sends pages over the net (d) shows line numbers
  3. 3.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Rain today</p>
    <h2>Our school trip</h2>
  4. 4.Which of these is an opening tag? (a) </body> (b) <b> (c) </h1> (d) </b>
  5. 5.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <h3>I love mangoes.</h3>
  6. 6.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  7. 7.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  8. 8.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) <head> (d) <!DOCTYPE html>
  9. 9.True or false: in <img>, width is read by screen readers. (a) True (b) False
  10. 10.True or false: in <img>, width sets how wide it is. (a) True (b) False
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Birds sing</p>
  12. 12.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) I like to read. (c) Welcome! (d) index.html
  14. 14.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
  15. 15.True or false: <a> goes in the head. (a) True (b) False
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  17. 17.Which of these is an empty tag? (a) <b> (b) <li> (c) <ul> (d) <hr>
  18. 18.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  19. 19.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) Our school bus (b) width (c) The full moon (d) moon.png
  21. 21.True or false: HTML on its own cannot make tables. (a) True (b) False
  22. 22.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
  23. 23.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  24. 24.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
  25. 25.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Our school trip</p>
    <p>The red kite</p>
  26. 26.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
  27. 27.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.True or false: <h1> is an empty tag. (a) False (b) True
  29. 29.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
  30. 30.🔍 One closing tag is missing. Which one?
    <small>My pets</small>
    <b>Rain today
    <h3>I love mangoes.</h3>
    (a) </strong> (b) </small> (c) </h3> (d) </b>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="100">
  33. 33.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My pets</p> -->
  34. 34.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) https://example.com (b) about.html (c) Art corner (d) contact.html
  35. 35.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Hello, world! (b) The red kite (c) I love mangoes.
  36. 36.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
  37. 37.Which of these goes in the head? (a) <table> (b) <ul> (c) <style> (d) <a>
  38. 38.📄 Can HTML on its own make tables? (a) Yes (b) No
  39. 39.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
  40. 40.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) Visit the site (b) art.html (c) Maths fun (d) href

Answer key

  1. 1
  2. sends pages over the net
  3. 2
  4. <b>
  5. 2
  6. <!DOCTYPE html>
  7. <h1>
  8. </html>
  9. False
  10. True
  11. 3
  12. src
  13. My Hobbies
  14. a slash /
  15. False
  16. numbers
  17. <hr>
  18. a closing tag
  19. numbers
  20. The full moon
  21. False
  22. <h6>
  23. <ul>
  24. <h6>
  25. 1
  26. a web server
  27. in the body
  28. False
  29. <h6>
  30. </b>
  31. 2
  32. 100
  33. 1
  34. about.html
  35. I love mangoes.
  36. 1
  37. <style>
  38. Yes
  39. to describe the image
  40. Visit the site

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