← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 762 · 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: <img> has a closing tag. (a) True (b) False
  2. 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  3. 3.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h2>My pets</h2>
    <p>Cricket is fun.</p>
    <h2>Good morning!</h2>
    <h2>The red kite</h2>
  4. 4.True or false: a web browser opens web pages for us. (a) False (b) True
  5. 5.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) A happy dog (b) width (c) The full moon (d) dog.jpg
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  8. 8.Which of these goes in the head? (a) <a> (b) <ul> (c) <title> (d) <table>
  9. 9.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
  10. 10.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  11. 11.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in a new tab (b) in the same tab
  13. 13.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
  14. 14.True or false: in <img>, height sets how tall it is. (a) True (b) False
  15. 15.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
  16. 16.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) colours code to help us
  17. 17.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  18. 18.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  19. 19.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) answers page requests (d) opens web pages for us
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) Map of India (b) A red kite (c) kite.png (d) width
  22. 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
  24. 24.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
  25. 25.True or false: <h1> is an empty tag. (a) True (b) False
  26. 26.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) news.html (b) Visit the site (c) Maths fun (d) href
  27. 27.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  28. 28.True or false: a web server answers page requests. (a) True (b) False
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
  30. 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  31. 31.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  33. 33.Which of these is an opening tag? (a) </h1> (b) <p> (c) </li> (d) </p>
  34. 34.True or false: HTML on its own can make links to pages. (a) True (b) False
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width
  36. 36.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  38. 38.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  39. 39.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My best friend</p>
    <h2>Fun facts</h2>
  40. 40.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width

Answer key

  1. False
  2. No
  3. 3
  4. True
  5. Yes
  6. A happy dog
  7. <h1>
  8. <title>
  9. <h2>
  10. a web server
  11. an empty tag
  12. in the same tab
  13. <h6>
  14. True
  15. 1
  16. colours code to help us
  17. <ul>
  18. <h1>
  19. has a closing tag
  20. answers page requests
  21. A red kite
  22. a slash /
  23. <h1>
  24. </p>
  25. False
  26. Visit the site
  27. opens it in a new tab
  28. True
  29. 2
  30. <li>
  31. in the body
  32. <!DOCTYPE html>
  33. <p>
  34. True
  35. Birthday cake
  36. an empty tag
  37. in the same tab
  38. in a new tab
  39. 2
  40. alt

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