← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 744 · 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.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
  2. 2.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  3. 3.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  4. 4.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) art.html (b) Art corner (c) quiz.html (d) news.html
  5. 5.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <h2>Good morning!</h2>
  6. 6.Which of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </body>
  7. 7.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
  8. 8.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
  9. 9.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) Fun facts (b) Rain today (c) Good morning! (d) Cricket is fun.
  10. 10.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  11. 11.True or false: a web server opens web pages for us. (a) True (b) False
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <strong>The red kite
    line 3: <h2>My pets</h2>
    (a) line 2 (b) line 3 (c) line 1
  13. 13.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  14. 14.📋 What number does the browser show next to “Banana”?
    <ol start="3">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  15. 15.True or false: <img> goes in the head. (a) False (b) True
  16. 16.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
  19. 19.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) <head> (d) <!DOCTYPE html>
  21. 21.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    (a) Our school trip (b) My pets (c) My best friend (d) Fun facts
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    (a) Rain today (b) Hello, world! (c) I love mangoes.
  23. 23.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  24. 24.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) art.html (b) maths.html (c) Maths fun (d) news.html
  25. 25.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  26. 26.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <h2>Our school trip</h2>
    <p>The red kite</p>
  27. 27.Which of these is an empty tag? (a) <h1> (b) <p> (c) <meta> (d) <title>
  28. 28.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) quiz.html (b) Art corner (c) about.html (d) games.html
  29. 29.🔍 Which is the odd one out? (a) shows pages from the web (b) shows line numbers (c) has an address bar (d) opens web pages for us
  30. 30.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Art Gallery (b) Mars is red. (c) Match report (d) index.html
  33. 33.True or false: <li> is an empty tag. (a) False (b) True
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite
    line 2: <strong>Fun facts</strong>
    line 3: <em>Rain today</em>
    (a) line 1 (b) line 3 (c) line 2
  35. 35.🔍 One closing tag is missing. Which one?
    <em>Fun facts</em>
    <u>Good morning!
    <i>Rain today</i>
    (a) </u> (b) </i> (c) </h3> (d) </em>
  36. 36.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) A red kite (b) map.png (c) kite.png (d) cake.jpg
  37. 37.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) is where we type code (d) answers page requests
  38. 38.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    (a) Our school trip (b) Hello, world! (c) The red kite
  39. 39.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  40. 40.Which of these is an empty tag? (a) <img> (b) <p> (c) <ul> (d) <b>

Answer key

  1. <h1>
  2. <img>
  3. No
  4. art.html
  5. 5
  6. <p>
  7. 2
  8. 2
  9. Fun facts
  10. <a>
  11. False
  12. line 2
  13. <ol>
  14. 4
  15. False
  16. an opening tag
  17. 2
  18. 4
  19. has a closing tag
  20. <!DOCTYPE html>
  21. My best friend
  22. I love mangoes.
  23. alt
  24. maths.html
  25. 3
  26. 2
  27. <meta>
  28. quiz.html
  29. shows line numbers
  30. an attribute
  31. 3
  32. Art Gallery
  33. False
  34. line 1
  35. </u>
  36. kite.png
  37. is where we type code
  38. Our school trip
  39. <li>
  40. <img>

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