← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 527 · 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.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  3. 3.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) Our school trip (c) Cricket is fun.
  5. 5.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  6. 6.Which of these is an empty tag? (a) <title> (b) <li> (c) <ul> (d) <meta>
  7. 7.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Birds sing<br>Stars shine<br>Sky is blue</p>
  9. 9.True or false: in <img>, src sets how wide it is. (a) False (b) True
  10. 10.True or false: <ul> goes in the body. (a) True (b) False
  11. 11.Which of these goes in the head? (a) <p> (b) <table> (c) <h1> (d) <style>
  12. 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  13. 13.True or false: <h1> has a closing tag. (a) True (b) False
  14. 14.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  15. 15.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) fort.jpg (b) bus.jpg (c) tiger.jpg (d) Our school bus
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>My pets</p>
  17. 17.🔍 One closing tag is missing. Which one?
    <h2>Fun facts</h2>
    <em>The red kite
    <h1>I love mangoes.</h1>
    (a) </em> (b) </h3> (c) </h2> (d) </h1>
  18. 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  19. 19.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  20. 20.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  21. 21.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
  22. 22.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
  23. 23.🔍 One closing tag is missing. Which one?
    <h2>My best friend</h2>
    <b>Hello, world!
    <h3>The red kite</h3>
    (a) </h2> (b) </strong> (c) </b> (d) </h3>
  24. 24.📝 What does <br> do? (a) makes a list (b) makes text bold (c) adds a picture (d) starts a new line
  25. 25.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) hosts websites online (d) turns HTML into a page
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  27. 27.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  28. 28.True or false: in <img>, height names the picture file. (a) True (b) False
  29. 29.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  30. 30.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    (a) I love mangoes. (b) The red kite (c) My best friend (d) Good morning!
  31. 31.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) href (c) games.html (d) Visit the site
  32. 32.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  33. 33.Which of these is true of a web browser? (a) shows pages from the web (b) saves our .html files (c) is where we type code (d) sends pages over the net
  34. 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  35. 35.True or false: in <img>, height sets how wide it is. (a) False (b) True
  36. 36.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h5>
  37. 37.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) width (c) Our school bus (d) The full moon
  39. 39.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  40. 40.True or false: <ol> lists steps in order. (a) True (b) False

Answer key

  1. in the body
  2. <!--
  3. <h6>
  4. Cricket is fun.
  5. <li>
  6. <meta>
  7. a line across the page
  8. 5
  9. False
  10. True
  11. <style>
  12. No
  13. True
  14. 1
  15. bus.jpg
  16. 3
  17. </em>
  18. a slash /
  19. <h6>
  20. a web browser
  21. 4
  22. <h1>
  23. </b>
  24. starts a new line
  25. hosts websites online
  26. 400
  27. a web server
  28. False
  29. <li>
  30. Good morning!
  31. Contact us
  32. False
  33. shows pages from the web
  34. <a href="about.html">
  35. False
  36. <h6>
  37. 3
  38. The full moon
  39. href
  40. True

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