← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 591 · 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 pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  2. 2.Which of these goes in the head? (a) <style> (b) <table> (c) <a> (d) <img>
  3. 3.True or false: a web browser shows line numbers. (a) False (b) True
  4. 4.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
  5. 5.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) A happy dog (b) dog.jpg (c) bus.jpg (d) moon.png
  6. 6.📋 What number does the browser show next to “Banana”?
    <ol start="2">
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Cricket is fun. (b) Our school trip (c) Rain today (d) The red kite
  9. 9.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) colours code to help us
  10. 10.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
  11. 11.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) My pets (c) My best friend (d) Cricket is fun.
  12. 12.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
  13. 13.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
  14. 14.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
  15. 15.💬 Does the browser show comments on the page? (a) No (b) Yes
  16. 16.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) colours code to help us (d) hosts websites online
  17. 17.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Easy snacks (c) Cricket Club (d) body
  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.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
  21. 21.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <!DOCTYPE html> (d) </body>
  22. 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  23. 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a dot (d) as a new line
  24. 24.True or false: <title> is an empty tag. (a) True (b) False
  25. 25.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  26. 26.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) games.html (b) news.html (c) Maths fun (d) quiz.html
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  28. 28.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  29. 29.🔍 One closing tag is missing. Which one?
    <u>Good morning!</u>
    <b>I love mangoes.
    <i>The red kite</i>
    (a) </strong> (b) </b> (c) </u> (d) </i>
  30. 30.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
  31. 31.True or false: a web browser turns HTML into a page. (a) False (b) True
  32. 32.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
  33. 33.True or false: in <img>, width tells which image to load. (a) False (b) True
  34. 34.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  35. 35.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  36. 36.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  37. 37.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  38. 38.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
  39. 39.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <small>My pets</small>
    <u>My best friend
    (a) </h2> (b) </p> (c) </u> (d) </small>

Answer key

  1. 250
  2. <style>
  3. False
  4. 2
  5. dog.jpg
  6. 4
  7. 250
  8. Our school trip
  9. colours code to help us
  10. 2
  11. Rain today
  12. 5
  13. -->
  14. alt
  15. No
  16. hosts websites online
  17. 2
  18. Easy snacks
  19. has a closing tag
  20. <
  21. </html>
  22. opens it in a new tab
  23. as one space
  24. False
  25. False
  26. news.html
  27. 150
  28. <ul>
  29. </b>
  30. <h5>
  31. True
  32. an attribute
  33. False
  34. No
  35. No
  36. 2
  37. element
  38. <h6>
  39. has a closing tag
  40. </u>

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