← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 386 · 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.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  2. 2.Which of these is a closing tag? (a) <p> (b) </h1> (c) <h1> (d) <body>
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Cricket is fun. (c) The red kite
  4. 4.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  5. 5.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>The red kite</p>
  6. 6.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to make it bigger (d) to load it faster
  7. 7.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) moon.png (b) A happy dog (c) dog.jpg (d) bus.jpg
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Match report (d) Space Facts
  9. 9.🔍 One closing tag is missing. Which one?
    <strong>My best friend</strong>
    <h3>My pets
    <b>Good morning!</b>
    (a) </h3> (b) </strong> (c) </p> (d) </b>
  10. 10.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h6>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
  11. 11.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  12. 12.📄 Can HTML on its own make tables? (a) No (b) Yes
  13. 13.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
  14. 14.True or false: <li> is one item of a list. (a) False (b) True
  15. 15.True or false: a code editor is where we type code. (a) False (b) True
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  17. 17.Which of these is a closing tag? (a) <b> (b) <body> (c) </b> (d) <li>
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite</u>
    line 2: <i>Our school trip</i>
    line 3: <em>Rain today
    (a) line 3 (b) line 1 (c) line 2
  20. 20.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) Here is my best one. (d) Planets
  22. 22.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  23. 23.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
  25. 25.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) colours code to help us
  26. 26.True or false: a web server sends pages over the net. (a) True (b) False
  27. 27.Which of these goes in the head? (a) <title> (b) <p> (c) <table> (d) <h1>
  28. 28.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
  29. 29.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  30. 30.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>The red kite</h2>
    <h2>Our school trip</h2>
    <p>Our school trip</p>
    <h2>Good morning!</h2>
    <h2>Fun facts</h2>
  31. 31.True or false: a web server has an address bar. (a) False (b) True
  32. 32.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) Class 7 Blog (c) Easy snacks (d) We won by 5 runs.
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) width (b) The full moon (c) moon.png (d) Our school bus
  36. 36.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  37. 37.True or false: <p> is an empty tag. (a) True (b) False
  38. 38.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  39. 39.🔍 One closing tag is missing. Which one?
    <em>My best friend</em>
    <p>My pets</p>
    <b>I love mangoes.
    (a) </em> (b) </b> (c) </p> (d) </h1>
  40. 40.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor

Answer key

  1. True
  2. </h1>
  3. Cricket is fun.
  4. a paragraph
  5. 4
  6. to describe the image
  7. dog.jpg
  8. Space Facts
  9. </h3>
  10. <h1>
  11. as one space
  12. Yes
  13. </html>
  14. True
  15. True
  16. <h1>
  17. </b>
  18. element
  19. line 3
  20. 1
  21. Planets
  22. False
  23. a code editor
  24. 2
  25. colours code to help us
  26. True
  27. <title>
  28. -->
  29. <li>
  30. 2
  31. False
  32. 4
  33. Yes
  34. Class 7 Blog
  35. The full moon
  36. href
  37. False
  38. <h6>
  39. </b>
  40. a web browser

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