← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 325 · 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.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  2. 2.🔍 One closing tag is missing. Which one?
    <h2>Good morning!
    <strong>Fun facts</strong>
    <p>Cricket is fun.</p>
    (a) </h2> (b) </p> (c) </h3> (d) </strong>
  3. 3.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  4. 4.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <a> (c) <meta charset="utf-8"> (d) <title>
  5. 5.True or false: a code editor answers page requests. (a) True (b) False
  6. 6.Which of these goes in the head? (a) <table> (b) <a> (c) <p> (d) <link rel="stylesheet">
  7. 7.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Hello, world! (c) My pets
  9. 9.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>Rain today</p>
  10. 10.True or false: <ol> is one item of a list. (a) False (b) True
  11. 11.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  12. 12.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  13. 13.True or false: <br> has a closing tag. (a) False (b) True
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  15. 15.True or false: HTML on its own can make tables. (a) False (b) True
  16. 16.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>The red kite</h2>
    <h4>I love mangoes.</h4>
    <p>Hello, world!</p>
  17. 17.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) width (b) fort.jpg (c) A tiger asleep (d) An old fort
  19. 19.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a plain text editor (d) a printer
  20. 20.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
  22. 22.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  23. 23.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  24. 24.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  25. 25.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <h4>Hello, world!</h4>
  26. 26.True or false: in <img>, height tells which image to load. (a) False (b) True
  27. 27.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  28. 28.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) Play games (c) Take the quiz (d) href
  29. 29.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Art Gallery (b) Easy snacks (c) index.html (d) Here is my best one.
  30. 30.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🏷️ Which is the closing tag for <b>? (a) <b/> (b) </b> (c) <b> (d) <\b>
  32. 32.True or false: <p> is an empty tag. (a) True (b) False
  33. 33.True or false: a web browser stores a website’s files. (a) True (b) False
  34. 34.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  35. 35.True or false: <li> lists things in any order. (a) False (b) True
  36. 36.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  37. 37.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>I love mangoes.</h3>
    <h2>Rain today</h2>
    <h3>The red kite</h3>
    <p>Our school trip</p>
  38. 38.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) <html>
  39. 39.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  40. 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>

Answer key

  1. 200
  2. </h2>
  3. 1
  4. <a>
  5. False
  6. <link rel="stylesheet">
  7. an empty tag
  8. Rain today
  9. 1
  10. False
  11. False
  12. <h6>
  13. False
  14. 2
  15. True
  16. 3
  17. a web browser
  18. An old fort
  19. a plain text editor
  20. a closing tag
  21. <h1>
  22. src
  23. starts a new line
  24. <h1>
  25. 2
  26. False
  27. a web browser
  28. Take the quiz
  29. Art Gallery
  30. in the body
  31. </b>
  32. False
  33. False
  34. <ul>
  35. False
  36. 6
  37. 4
  38. <!DOCTYPE html>
  39. <h6>
  40. </h1>

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