← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 909 · 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.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.Which of these is an opening tag? (a) </title> (b) </li> (c) <title> (d) </b>
  3. 3.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  4. 4.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
  6. 6.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  7. 7.🔠 Are headings shown in bold by default? (a) Yes (b) No
  8. 8.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  9. 9.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  10. 10.True or false: <b> has a closing tag. (a) True (b) False
  11. 11.🔍 Which is the odd one out? (a) colours code to help us (b) answers page requests (c) is where we type code (d) shows line numbers
  12. 12.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
  13. 13.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  14. 14.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  15. 15.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.True or false: a web browser saves our .html files. (a) False (b) True
  17. 17.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <small>Rain today</small>
    <h3>My best friend
    (a) </h1> (b) </small> (c) </u> (d) </h3>
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Hello, world! (c) I love mangoes. (d) My best friend
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
    <h3>The red kite</h3>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
  22. 22.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) src (d) width
  23. 23.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My drawings (b) body (c) Here is my best one. (d) Space Facts
  24. 24.Which of these is true of a web browser? (a) turns HTML into a page (b) answers page requests (c) shows line numbers (d) colours code to help us
  25. 25.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  26. 26.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  28. 28.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  29. 29.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  30. 30.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  31. 31.True or false: in <img>, width shows if the image fails. (a) True (b) False
  32. 32.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  33. 33.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) src (d) height
  34. 34.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) Cricket is fun. (c) Hello, world!
  35. 35.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>
  36. 36.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <em>Our school trip
    line 2: <u>My pets</u>
    line 3: <p>Hello, world!</p>
    (a) line 1 (b) line 2 (c) line 3
  40. 40.True or false: <li> is an ordered list. (a) False (b) True

Answer key

  1. has a closing tag
  2. <title>
  3. 3
  4. <img>
  5. 3
  6. Yes
  7. Yes
  8. False
  9. <
  10. True
  11. answers page requests
  12. alt
  13. opens it in a new tab
  14. <ol>
  15. an opening tag
  16. False
  17. </h3>
  18. 350
  19. Hello, world!
  20. 3
  21. 1
  22. height
  23. My drawings
  24. turns HTML into a page
  25. <a>
  26. True
  27. 2
  28. <a href="about.html">
  29. <h6>
  30. bullets
  31. False
  32. a paragraph
  33. src
  34. Cricket is fun.
  35. </b>
  36. a closing tag
  37. an opening tag
  38. href
  39. line 1
  40. False

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