← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 306 · 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.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
  2. 2.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  3. 3.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  4. 4.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) width (b) cake.jpg (c) A happy dog (d) Birthday cake
  6. 6.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) stores a website’s files (d) opens web pages for us
  7. 7.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  8. 8.Which of these is an opening tag? (a) </h1> (b) </b> (c) <p> (d) </p>
  9. 9.True or false: <ol> lists things in any order. (a) True (b) False
  10. 10.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  11. 11.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  12. 12.True or false: <ul> goes in the body. (a) False (b) True
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  14. 14.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
  15. 15.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png
  16. 16.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>My pets</h3>
    <h3>My best friend</h3>
    <h2>Fun facts</h2>
  17. 17.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <p> (d) <style>
  18. 18.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) Our school bus (b) fort.jpg (c) bus.jpg (d) tiger.jpg
  21. 21.💬 Does the browser show comments on the page? (a) No (b) Yes
  22. 22.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  23. 23.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
  24. 24.Which of these is a closing tag? (a) </p> (b) <b> (c) <body> (d) <li>
  25. 25.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) contact.html
  26. 26.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
  27. 27.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) The red kite (b) Hello, world! (c) Good morning! (d) My best friend
  28. 28.Which of these is true of a code editor? (a) answers page requests (b) has an address bar (c) saves our .html files (d) shows pages from the web
  29. 29.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  30. 30.True or false: <ul> goes inside ul or ol. (a) False (b) True
  31. 31.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  33. 33.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  34. 34.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
  35. 35.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) href (c) Visit the site (d) Maths fun
  36. 36.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  37. 37.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  38. 38.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  40. 40.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body

Answer key

  1. opens it in a new tab
  2. <!DOCTYPE html>
  3. <li>
  4. <h6>
  5. Birthday cake
  6. opens web pages for us
  7. <ol>
  8. <p>
  9. False
  10. 5
  11. in the body
  12. True
  13. 1
  14. <h5>
  15. map.png
  16. 4
  17. <p>
  18. an opening tag
  19. 2
  20. bus.jpg
  21. No
  22. 2
  23. a slash /
  24. </p>
  25. Maths fun
  26. 3
  27. The red kite
  28. saves our .html files
  29. True
  30. False
  31. in the head
  32. Yes
  33. <h1>
  34. <h5>
  35. Visit the site
  36. <html>
  37. in the head
  38. an opening tag
  39. a web browser
  40. the body

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