← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 351 · 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.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Kites fly high<br>Rivers flow<br>Birds sing</p>
  3. 3.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) games.html (b) href (c) About us (d) Contact us
  4. 4.Which of these is a closing tag? (a) <li> (b) <b> (c) <h1> (d) </title>
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  6. 6.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>Cricket is fun.</h4>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
  7. 7.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.True or false: <input> is an empty tag. (a) True (b) False
  9. 9.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
  10. 10.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  11. 11.Which of these is a closing tag? (a) <b> (b) </b> (c) <li> (d) <body>
  12. 12.Which of these is an opening tag? (a) <body> (b) </li> (c) </title> (d) </b>
  13. 13.Which of these goes in the head? (a) <style> (b) <ul> (c) <a> (d) <h1>
  14. 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  15. 15.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  16. 16.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
  17. 17.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Cricket is fun.</h2>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
  18. 18.📄 Can HTML on its own make tables? (a) Yes (b) No
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <p>Fun facts</p>
    line 2: <b>Cricket is fun.</b>
    line 3: <h3>My pets
    (a) line 1 (b) line 2 (c) line 3
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
  21. 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
  22. 22.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  23. 23.True or false: <p> is an empty tag. (a) True (b) False
  24. 24.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  25. 25.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
  26. 26.Which of these is an opening tag? (a) </li> (b) </h1> (c) </p> (d) <p>
  27. 27.Which of these is an opening tag? (a) </b> (b) <h1> (c) </title> (d) </li>
  28. 28.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  29. 29.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  31. 31.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>My best friend</p>
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Rivers flow<br>Kites fly high</p>
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  34. 34.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>The red kite</p>
  35. 35.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  36. 36.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  38. 38.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Markup (d) Modern
  39. 39.True or false: <ul> shows bullet points. (a) False (b) True
  40. 40.🔍 One closing tag is missing. Which one?
    <u>Fun facts</u>
    <h2>Good morning!
    <h3>Hello, world!</h3>
    (a) </h3> (b) </h1> (c) </h2> (d) </u>

Answer key

  1. <
  2. 5
  3. About us
  4. </title>
  5. <h1>
  6. 3
  7. in the body
  8. True
  9. src
  10. 6
  11. </b>
  12. <body>
  13. <style>
  14. <ol>
  15. -->
  16. opens it in a new tab
  17. 4
  18. Yes
  19. line 3
  20. 2
  21. <h5>
  22. an attribute
  23. False
  24. has a closing tag
  25. alt
  26. <p>
  27. <h1>
  28. No
  29. in the head
  30. <!--
  31. 4
  32. 4
  33. 4
  34. 3
  35. 4
  36. an empty tag
  37. Yes
  38. Markup
  39. True
  40. </h2>

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