← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 841 · 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.Which of these goes in the head? (a) <p> (b) <h1> (c) <table> (d) <style>
  2. 2.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
  3. 3.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  4. 4.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  5. 5.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  6. 6.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  7. 7.🔗 Where does this link open?
    <a href="maths.html">School news</a>
    (a) in the same tab (b) in a new tab
  8. 8.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
  9. 9.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  10. 10.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  12. 12.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
  13. 13.Which of these has a closing tag? (a) <title> (b) <br> (c) <input> (d) <img>
  14. 14.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
  15. 15.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
  16. 16.💬 Does the browser show comments on the page? (a) No (b) Yes
  17. 17.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  18. 18.True or false: <ul> has a closing tag. (a) True (b) False
  19. 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <img> (d) <style>
  20. 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  21. 21.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
  22. 22.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  23. 23.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Our school trip</h4>
    <h2>Hello, world!</h2>
  24. 24.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
  25. 25.Which of these has a closing tag? (a) <br> (b) <input> (c) <ul> (d) <meta>
  26. 26.Which of these is an empty tag? (a) <b> (b) <title> (c) <h1> (d) <meta>
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <b>Hello, world!</b>
    <h2>Our school trip
    (a) </h2> (b) </h1> (c) </b> (d) </h3>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  29. 29.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>The red kite</p>
    <p>Hello, world!</p>
  30. 30.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  31. 31.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  32. 32.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  33. 33.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  35. 35.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) My pets (c) Rain today (d) I love mangoes.
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  37. 37.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  38. 38.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
  39. 39.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) Visit the site (c) art.html (d) news.html
  40. 40.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Our school trip</h2>
    <h3>My pets</h3>
    <p>My best friend</p>

Answer key

  1. <style>
  2. 1
  3. a web server
  4. False
  5. <h1>
  6. to leave notes
  7. in the same tab
  8. the body
  9. a web browser
  10. <h5>
  11. A tiger asleep
  12. <h6>
  13. <title>
  14. 1
  15. 1
  16. No
  17. </h2>
  18. True
  19. <img>
  20. No
  21. <h1>
  22. Yes
  23. 3
  24. 2
  25. <ul>
  26. <meta>
  27. </h2>
  28. 50
  29. 1
  30. 3
  31. <h2>
  32. as one space
  33. <ul>
  34. numbers
  35. My pets
  36. 250
  37. Yes
  38. a paragraph
  39. art.html
  40. 3

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