← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 690 · 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 headings are in this code?
    <h1>Our school trip</h1>
    <h3>The red kite</h3>
    <h4>My best friend</h4>
    <h4>I love mangoes.</h4>
    <p>Hello, world!</p>
  2. 2.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
  3. 3.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
  4. 4.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  5. 5.True or false: <input> is an empty tag. (a) False (b) True
  6. 6.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Good morning!</p> -->
  7. 7.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets
    line 2: <p>My best friend</p>
    line 3: <h2>Fun facts</h2>
    (a) line 3 (b) line 1 (c) line 2
  9. 9.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <title>
  10. 10.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  11. 11.Which of these is a closing tag? (a) </body> (b) <b> (c) <title> (d) <li>
  12. 12.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  14. 14.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) href (b) Art corner (c) news.html (d) Maths fun
  15. 15.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h6>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
  16. 16.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  17. 17.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  18. 18.Which of these has a closing tag? (a) <input> (b) <li> (c) <hr> (d) <meta>
  19. 19.🌐 Which one sends pages over the net? (a) a code editor (b) a web server (c) a web browser
  20. 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  21. 21.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) <p/> (d) </p>
  22. 22.Which of these has a closing tag? (a) <hr> (b) <br> (c) <b> (d) <img>
  23. 23.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  24. 24.📄 Can HTML on its own make headings? (a) Yes (b) No
  25. 25.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  26. 26.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  27. 27.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  28. 28.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  29. 29.🔍 One closing tag is missing. Which one?
    <small>Our school trip</small>
    <u>Fun facts</u>
    <strong>I love mangoes.
    (a) </b> (b) </strong> (c) </small> (d) </u>
  30. 30.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <\h3> (c) <h3> (d) <h3/>
  31. 31.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  32. 32.Which of these has a closing tag? (a) <input> (b) <img> (c) <ul> (d) <meta>
  33. 33.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  35. 35.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  36. 36.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  37. 37.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h5> (b) <h3> (c) <h2> (d) <h6>
  40. 40.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h1>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>

Answer key

  1. 4
  2. the body
  3. src
  4. <li>
  5. True
  6. 2
  7. <ol>
  8. line 1
  9. <title>
  10. 3
  11. </body>
  12. <img>
  13. Yes
  14. Maths fun
  15. <h6>
  16. False
  17. 2
  18. <li>
  19. a web server
  20. on the browser tab
  21. </p>
  22. <b>
  23. 1
  24. Yes
  25. <h1>
  26. 6
  27. alt
  28. a web server
  29. </strong>
  30. </h3>
  31. <ul>
  32. <ul>
  33. True
  34. numbers
  35. in a new tab
  36. -->
  37. an opening tag
  38. <h1>
  39. <h2>
  40. <h6>

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