← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 739 · 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 this link open?
    <a href="news.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  2. 2.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
  4. 4.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>My pets</p>
  6. 6.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) stores a website’s files (d) saves our .html files
  7. 7.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  8. 8.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  9. 9.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  10. 10.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
  11. 11.Which of these is true of a web browser? (a) hosts websites online (b) has an address bar (c) is where we type code (d) sends pages over the net
  12. 12.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <h1>My pets
    <u>Rain today</u>
    (a) </h2> (b) </h3> (c) </u> (d) </h1>
  13. 13.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  14. 14.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
  15. 15.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
  16. 16.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  17. 17.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  18. 18.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <img> (d) <style>
  19. 19.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  20. 20.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
  21. 21.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
  22. 22.True or false: <ul> is one item of a list. (a) True (b) False
  23. 23.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Easy snacks (d) Art Gallery
  25. 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  26. 26.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
  27. 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  28. 28.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  29. 29.Which of these goes in the head? (a) <h1> (b) <p> (c) <link rel="stylesheet"> (d) <a>
  30. 30.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  31. 31.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
    <p>My pets</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  32. 32.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
  33. 33.True or false: a web server is where we type code. (a) False (b) True
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) Cricket is fun. (b) I love mangoes. (c) My best friend
  35. 35.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  36. 36.Which of these goes in the body? (a) <a> (b) <style> (c) <title> (d) <link rel="stylesheet">
  37. 37.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>I love mangoes.</h2>
    <h2>The red kite</h2>
    <h2>Hello, world!</h2>
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) width (b) Map of India (c) map.png (d) Birthday cake
  39. 39.True or false: HTML on its own cannot make headings. (a) True (b) False
  40. 40.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. in a new tab
  2. False
  3. 1
  4. an opening tag
  5. 2
  6. stores a website’s files
  7. Yes
  8. on the browser tab
  9. False
  10. <h3>
  11. has an address bar
  12. </h1>
  13. <ul>
  14. <h1>
  15. alt
  16. 5
  17. 4
  18. <img>
  19. <ul>
  20. src
  21. width
  22. False
  23. 5
  24. Art Gallery
  25. No
  26. <h2>
  27. a slash /
  28. 6
  29. <link rel="stylesheet">
  30. a web browser
  31. 4
  32. to leave notes
  33. False
  34. Cricket is fun.
  35. <h6>
  36. <a>
  37. 1
  38. Map of India
  39. False
  40. an opening tag

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