← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 525 · 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.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  2. 2.Which of these is an opening tag? (a) </b> (b) </h1> (c) </p> (d) <h1>
  3. 3.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) School news (b) href (c) Take the quiz (d) games.html
  5. 5.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  6. 6.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) src (d) alt
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
  8. 8.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
  9. 9.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  11. 11.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
  12. 12.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) The full moon (b) Our school bus (c) moon.png (d) width
  14. 14.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Our school trip (c) Good morning! (d) Cricket is fun.
  15. 15.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  16. 16.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
  17. 17.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  18. 18.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A tiger asleep (b) tiger.jpg (c) map.png (d) kite.png
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="100">
  20. 20.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p> (d) <p/>
  21. 21.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  23. 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  24. 24.True or false: <ol> lists steps in order. (a) True (b) False
  25. 25.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <h4>Cricket is fun.</h4>
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  27. 27.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png
  28. 28.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
  30. 30.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite</h1>
    line 2: <h2>My pets</h2>
    line 3: <p>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  32. 32.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) games.html (b) contact.html (c) about.html (d) Take the quiz
  33. 33.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) My Hobbies (d) Planets
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today
    line 2: <strong>Good morning!</strong>
    line 3: <em>I love mangoes.</em>
    (a) line 3 (b) line 1 (c) line 2
  36. 36.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>My pets</h3>
    <p>I love mangoes.</p>
    <h3>Our school trip</h3>
    <p>Rain today</p>
  37. 37.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  38. 38.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Easy snacks (b) I like to read. (c) index.html (d) My Hobbies
  39. 39.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  40. 40.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">

Answer key

  1. Yes
  2. <h1>
  3. an opening tag
  4. School news
  5. <
  6. alt
  7. 2
  8. on the browser tab
  9. <img>
  10. 3
  11. to describe the image
  12. <li>
  13. The full moon
  14. Our school trip
  15. <ul>
  16. 6
  17. a line across the page
  18. tiger.jpg
  19. 100
  20. </p>
  21. an opening tag
  22. 2
  23. a slash /
  24. True
  25. 3
  26. <h1>
  27. moon.png
  28. in the head
  29. <h5>
  30. <h5>
  31. line 3
  32. games.html
  33. in the body
  34. My Hobbies
  35. line 1
  36. 3
  37. <li>
  38. My Hobbies
  39. 2
  40. 350

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