← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 317 · 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.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) </head> (d) </body>
  2. 2.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
  3. 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  4. 4.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    (a) Cricket is fun. (b) The red kite (c) My best friend (d) My pets
  5. 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  6. 6.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  8. 8.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  9. 9.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  10. 10.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Fun facts</p>
    <h4>Hello, world!</h4>
  11. 11.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  13. 13.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  14. 14.Which of these is an empty tag? (a) <li> (b) <img> (c) <ul> (d) <p>
  15. 15.True or false: <ul> shows bullet points. (a) False (b) True
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>My pets</p>
  17. 17.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <h3>Our school trip</h3>
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
  19. 19.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  20. 20.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
  21. 21.True or false: <a> goes in the head. (a) True (b) False
  22. 22.Which of these has a closing tag? (a) <img> (b) <meta> (c) <hr> (d) <p>
  23. 23.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) news.html (b) maths.html (c) art.html (d) Contact us
  24. 24.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  25. 25.📄 Can HTML on its own make tables? (a) No (b) Yes
  26. 26.📋 What number does the browser show next to “Papaya”?
    <ol start="8">
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  27. 27.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
  28. 28.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h1> (b) <h6> (c) <h2> (d) <h5>
  30. 30.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  31. 31.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Fun facts</p>
    <p>Good morning!</p>
  32. 32.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  33. 33.Which of these has a closing tag? (a) <input> (b) <meta> (c) <hr> (d) <h1>
  34. 34.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <strong>Rain today
    <h3>Our school trip</h3>
    (a) </h2> (b) </h3> (c) </p> (d) </strong>
  35. 35.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) I like to read. (c) Class 7 Blog (d) Easy snacks
  36. 36.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small> (d) <small/>
  37. 37.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  38. 38.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  39. 39.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
  40. 40.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>

Answer key

  1. </html>
  2. 1
  3. <img>
  4. The red kite
  5. <a href="about.html">
  6. a closing tag
  7. an empty tag
  8. alt
  9. a slash /
  10. 2
  11. Markup
  12. 2
  13. <a>
  14. <img>
  15. True
  16. 1
  17. 3
  18. 1
  19. <h6>
  20. <html>
  21. False
  22. <p>
  23. maths.html
  24. <ul>
  25. Yes
  26. 9
  27. <head>
  28. False
  29. <h1>
  30. True
  31. 1
  32. True
  33. <h1>
  34. </strong>
  35. Easy snacks
  36. </small>
  37. <
  38. Yes
  39. 4
  40. <h1>

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