← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 670 · 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="dog.jpg" alt="A happy dog" width="350">
  2. 2.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
  3. 3.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
  4. 4.True or false: in <img>, src sets how wide it is. (a) False (b) True
  5. 5.True or false: a web server colours code to help us. (a) True (b) False
  6. 6.True or false: <ul> goes in the body. (a) True (b) False
  7. 7.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) My best friend (c) Good morning! (d) My pets
  8. 8.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h4>
  9. 9.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
  10. 10.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <head> (c) </html> (d) </body>
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  12. 12.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.🔍 One closing tag is missing. Which one?
    <strong>Fun facts</strong>
    <small>Good morning!
    <h2>My pets</h2>
    (a) </h2> (b) </strong> (c) </h3> (d) </small>
  14. 14.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
    </ul>
  15. 15.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Fun facts</p>
  16. 16.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) href (c) Maths fun (d) Art corner
  17. 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  18. 18.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
  20. 20.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  21. 21.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <p>Hello, world!</p>
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
  23. 23.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <a> (d) <table>
  24. 24.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Hello, world! (c) Fun facts
  26. 26.🔍 One closing tag is missing. Which one?
    <u>Hello, world!</u>
    <i>I love mangoes.</i>
    <strong>Cricket is fun.
    (a) </strong> (b) </i> (c) </b> (d) </u>
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <p>I love mangoes.</p>
    line 2: <em>Cricket is fun.
    line 3: <strong>Fun facts</strong>
    (a) line 3 (b) line 1 (c) line 2
  28. 28.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  29. 29.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) My best friend (b) Our school trip (c) Rain today
  30. 30.Which of these is a closing tag? (a) <body> (b) </li> (c) <title> (d) <h1>
  31. 31.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) bus.jpg (c) The full moon (d) fort.jpg
  33. 33.🏷️ Which is the closing tag for <b>? (a) <b> (b) <\b> (c) </b> (d) <b/>
  34. 34.Which of these is true of a code editor? (a) shows pages from the web (b) is where we type code (c) hosts websites online (d) sends pages over the net
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <p>The red kite
    line 2: <strong>My best friend</strong>
    line 3: <b>Fun facts</b>
    (a) line 2 (b) line 1 (c) line 3
  36. 36.True or false: a web browser shows pages from the web. (a) False (b) True
  37. 37.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
  38. 38.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
  39. 39.Which of these is an opening tag? (a) </h1> (b) </body> (c) <title> (d) </p>
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Roses are red<br>Kites fly high<br>Sky is blue</p>

Answer key

  1. 350
  2. <h1>
  3. a slash /
  4. False
  5. False
  6. True
  7. I love mangoes.
  8. <h2>
  9. 3
  10. </html>
  11. <h1>
  12. an opening tag
  13. </small>
  14. 3
  15. 3
  16. Maths fun
  17. <img>
  18. Yes
  19. 3
  20. <ul>
  21. 2
  22. <h1>
  23. <link rel="stylesheet">
  24. an opening tag
  25. I love mangoes.
  26. </strong>
  27. line 2
  28. bullets
  29. My best friend
  30. </li>
  31. in the body
  32. moon.png
  33. </b>
  34. is where we type code
  35. line 1
  36. True
  37. a code editor
  38. 1
  39. <title>
  40. 5

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