← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 998 · 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: HTML on its own can add pictures to a page. (a) True (b) False
  2. 2.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  3. 3.True or false: a code editor colours code to help us. (a) False (b) True
  4. 4.Which of these is an opening tag? (a) </h1> (b) <p> (c) </p> (d) </li>
  5. 5.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  6. 6.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
  7. 7.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <head> (c) <html> (d) <!DOCTYPE html>
  8. 8.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <h3>Good morning!</h3>
    <p>Our school trip</p>
  9. 9.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Cricket Club (b) Planets (c) index.html (d) I like to read.
  12. 12.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) shows pages from the web (d) stores a website’s files
  14. 14.🔗 Where does this link open?
    <a href="maths.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  15. 15.True or false: HTML on its own can count button clicks. (a) False (b) True
  16. 16.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
  18. 18.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
  20. 20.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Rain today</p> -->
  21. 21.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  22. 22.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  24. 24.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  25. 25.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) About us (b) href (c) maths.html (d) Contact us
  26. 26.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My pets</p>
    <p>Hello, world!</p>
    <h4>The red kite</h4>
    <p>Our school trip</p>
  27. 27.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) maths.html (b) art.html (c) https://example.com (d) Maths fun
  28. 28.True or false: HTML on its own can keep a high score. (a) False (b) True
  29. 29.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in the same tab (b) in a new tab
  30. 30.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  34. 34.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) My best friend (b) I love mangoes. (c) Fun facts (d) Hello, world!
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) contact.html (b) Visit the site (c) href (d) Maths fun
  36. 36.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) games.html (b) href (c) Contact us (d) Visit the site
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <small>Good morning!
    line 2: <b>My pets</b>
    line 3: <u>I love mangoes.</u>
    (a) line 2 (b) line 3 (c) line 1
  38. 38.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Our school trip</h2>
  39. 39.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>

Answer key

  1. True
  2. False
  3. True
  4. <p>
  5. <ul>
  6. 3
  7. <!DOCTYPE html>
  8. 2
  9. <h1>
  10. 100
  11. Cricket Club
  12. an opening tag
  13. shows pages from the web
  14. in a new tab
  15. False
  16. an empty tag
  17. to describe the image
  18. on the browser tab
  19. 1
  20. 1
  21. <ul>
  22. 1
  23. 2
  24. an attribute
  25. About us
  26. 2
  27. https://example.com
  28. False
  29. in the same tab
  30. in the body
  31. 2
  32. 5
  33. 400
  34. Hello, world!
  35. Visit the site
  36. Contact us
  37. line 1
  38. 4
  39. has a closing tag
  40. <a>

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