← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 118 · 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 items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>
  2. 2.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  3. 3.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) art.html (b) Play games (c) Take the quiz (d) href
  4. 4.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high</p>
  6. 6.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  7. 7.Which of these is true of a web server? (a) has an address bar (b) colours code to help us (c) is where we type code (d) answers page requests
  8. 8.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <ul> (d) <title>
  9. 9.True or false: <table> goes in the body. (a) True (b) False
  10. 10.🔍 One closing tag is missing. Which one?
    <p>Fun facts</p>
    <i>I love mangoes.</i>
    <h3>Hello, world!
    (a) </h3> (b) </em> (c) </p> (d) </i>
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Class 7 Blog (c) Welcome! (d) Try this poha.
  13. 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.True or false: in <img>, alt names the picture file. (a) True (b) False
  15. 15.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  16. 16.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
  17. 17.Which of these is a closing tag? (a) <p> (b) <h1> (c) <li> (d) </b>
  18. 18.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
  19. 19.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Good morning! (b) Fun facts (c) The red kite (d) I love mangoes.
  20. 20.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  22. 22.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    (a) Hello, world! (b) Rain today (c) My best friend
  24. 24.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) </body>
  25. 25.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) src (d) height
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets</h3>
    line 2: <i>My best friend
    line 3: <small>Hello, world!</small>
    (a) line 3 (b) line 2 (c) line 1
  28. 28.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.
    <h2>Hello, world!</h2>
    <b>Cricket is fun.</b>
    (a) </b> (b) </i> (c) </h2> (d) </em>
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) The full moon (b) dog.jpg (c) A happy dog (d) width
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  33. 33.🔗 Where does this link open?
    <a href="art.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  34. 34.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  35. 35.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) Play games (c) href (d) Take the quiz
  36. 36.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .mp3 (d) .html
  37. 37.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  38. 38.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  39. 39.🔍 One closing tag is missing. Which one?
    <u>Good morning!</u>
    <h1>Fun facts</h1>
    <h2>The red kite
    (a) </h1> (b) </h2> (c) </u> (d) </em>
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) I like to read. (d) Class 7 Blog

Answer key

  1. 3
  2. a web server
  3. Take the quiz
  4. a closing tag
  5. 4
  6. a slash /
  7. answers page requests
  8. <ul>
  9. True
  10. </h3>
  11. 1
  12. Class 7 Blog
  13. has a closing tag
  14. False
  15. a line across the page
  16. </h1>
  17. </b>
  18. <h1>
  19. I love mangoes.
  20. -->
  21. 50
  22. a closing tag
  23. Rain today
  24. <!DOCTYPE html>
  25. has a closing tag
  26. src
  27. line 2
  28. in the head
  29. </em>
  30. 250
  31. A happy dog
  32. 4
  33. in a new tab
  34. 6
  35. Take the quiz
  36. .html
  37. <a>
  38. opens it in a new tab
  39. </h2>
  40. Welcome!

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