← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 499 · 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.True or false: <h1> goes in the body. (a) False (b) True
  2. 2.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  3. 3.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <h2>Rain today</h2>
    <h2>My best friend</h2>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  4. 4.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <\small> (d) <small>
  5. 5.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  6. 6.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) Riya’s Recipes (c) All about me (d) We won by 5 runs.
  8. 8.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>The red kite</p>
    <h2>Rain today</h2>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  9. 9.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  11. 11.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) </strong> (d) <strong>
  12. 12.Which of these is true of a web browser? (a) stores a website’s files (b) shows pages from the web (c) colours code to help us (d) shows line numbers
  13. 13.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
  15. 15.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
  16. 16.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  17. 17.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep
  19. 19.🔍 Which is the odd one out? (a) turns HTML into a page (b) colours code to help us (c) saves our .html files (d) is where we type code
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) I like to read. (c) Cricket Club (d) My drawings
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>My best friend</p>
  22. 22.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) href (b) Maths fun (c) Visit the site (d) news.html
  24. 24.True or false: a web server hosts websites online. (a) False (b) True
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  26. 26.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <head> (d) </html>
  28. 28.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) href (b) art.html (c) Contact us (d) About us
  29. 29.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  30. 30.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts
    line 2: <h1>Good morning!</h1>
    line 3: <small>I love mangoes.</small>
    (a) line 2 (b) line 1 (c) line 3
  32. 32.Which of these is a closing tag? (a) <b> (b) <title> (c) <p> (d) </h1>
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) My Hobbies (c) body (d) Match report
  34. 34.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) Home Text (d) High Tech
  35. 35.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) href (b) Maths fun (c) Visit the site (d) art.html
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Birds sing<br>Kites fly high</p>
  38. 38.True or false: a web server is where we type code. (a) True (b) False
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <br> (d) <p>
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
    </ol>

Answer key

  1. True
  2. kite.png
  3. 3
  4. </small>
  5. <!DOCTYPE html>
  6. <ul>
  7. All about me
  8. 4
  9. <img>
  10. 100
  11. </strong>
  12. shows pages from the web
  13. an opening tag
  14. 2
  15. <h6>
  16. <ul>
  17. on the browser tab
  18. A tiger asleep
  19. turns HTML into a page
  20. My drawings
  21. 3
  22. a closing tag
  23. Visit the site
  24. True
  25. bullets
  26. has a closing tag
  27. </html>
  28. About us
  29. Yes
  30. hosts websites online
  31. line 1
  32. </h1>
  33. Match report
  34. HyperText
  35. Visit the site
  36. 1
  37. 4
  38. False
  39. <h1>
  40. 2

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