← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 406 · 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.🔍 One closing tag is missing. Which one?
    <h3>My pets
    <h2>Hello, world!</h2>
    <b>Rain today</b>
    (a) </h3> (b) </h2> (c) </b> (d) </h1>
  2. 2.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <h1> (c) </h1> (d) <\h1>
  3. 3.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) School news (b) games.html (c) Take the quiz (d) href
  4. 4.🔍 One closing tag is missing. Which one?
    <b>Rain today</b>
    <h2>I love mangoes.
    <h3>My pets</h3>
    (a) </b> (b) </h3> (c) </small> (d) </h2>
  5. 5.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  6. 6.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
  7. 7.True or false: HTML on its own can count button clicks. (a) False (b) True
  8. 8.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png
  9. 9.True or false: HTML on its own can pick a random number. (a) True (b) False
  10. 10.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>The red kite</h3>
    <p>Fun facts</p>
  11. 11.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
  13. 13.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>I love mangoes.</p>
    <h4>My pets</h4>
    <p>Cricket is fun.</p>
  14. 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  15. 15.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) Take the quiz (b) contact.html (c) games.html (d) about.html
  16. 16.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
  17. 17.Which of these is true of a code editor? (a) stores a website’s files (b) colours code to help us (c) shows pages from the web (d) sends pages over the net
  18. 18.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  19. 19.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
  20. 20.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  21. 21.Which of these is true of a web server? (a) saves our .html files (b) is where we type code (c) hosts websites online (d) has an address bar
  22. 22.True or false: a web browser answers page requests. (a) False (b) True
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <u>I love mangoes.
    line 3: <p>My best friend</p>
    (a) line 1 (b) line 3 (c) line 2
  25. 25.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  26. 26.True or false: a web browser shows pages from the web. (a) False (b) True
  27. 27.True or false: <style> goes in the head. (a) True (b) False
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine</p>
  29. 29.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  30. 30.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  31. 31.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <i>My best friend
    <u>Our school trip</u>
    (a) </u> (b) </em> (c) </i> (d) </p>
  32. 32.Which of these is a closing tag? (a) </b> (b) <li> (c) <h1> (d) <title>
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) My drawings (c) Here is my best one. (d) Class 7 Blog
  34. 34.💬 Does the browser show comments on the page? (a) No (b) Yes
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
  37. 37.Which of these is true of a code editor? (a) shows pages from the web (b) shows line numbers (c) opens web pages for us (d) stores a website’s files
  38. 38.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  40. 40.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) Contact us (b) news.html (c) About us (d) href

Answer key

  1. </h3>
  2. </h1>
  3. School news
  4. </h2>
  5. -->
  6. <h1>
  7. False
  8. tiger.jpg
  9. False
  10. 2
  11. a closing tag
  12. element
  13. 2
  14. Yes
  15. games.html
  16. structure
  17. colours code to help us
  18. a web server
  19. 2
  20. to describe the image
  21. hosts websites online
  22. False
  23. 5
  24. line 2
  25. in the body
  26. True
  27. True
  28. 2
  29. 4
  30. 6
  31. </i>
  32. </b>
  33. My drawings
  34. No
  35. 2
  36. 3
  37. shows line numbers
  38. a web browser
  39. 350
  40. About us

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