← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 631 · 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 text will NOT show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) Fun facts (d) My best friend
  2. 2.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2> (c) <h2/> (d) <\h2>
  3. 3.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  4. 4.True or false: in <img>, src tells which image to load. (a) False (b) True
  5. 5.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  7. 7.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  8. 8.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
  9. 9.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>Our school trip</p>
    <h2>Our school trip</h2>
    <p>Good morning!</p>
    <h2>I love mangoes.</h2>
  11. 11.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
  12. 12.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
  14. 14.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  15. 15.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) contact.html (b) Contact us (c) about.html (d) https://example.com
  17. 17.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt
  18. 18.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) The full moon (b) A happy dog (c) dog.jpg (d) width
  20. 20.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  21. 21.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  22. 22.💬 Does the browser show comments on the page? (a) No (b) Yes
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  24. 24.Which of these goes in the head? (a) <style> (b) <h1> (c) <a> (d) <img>
  25. 25.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
  26. 26.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to add colour (d) to leave notes
  27. 27.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  28. 28.True or false: <ul> shows bullet points. (a) False (b) True
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  30. 30.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Rain today</p>
    <h2>Hello, world!</h2>
    <h2>Cricket is fun.</h2>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
  31. 31.🔍 Which is the odd one out? (a) colours code to help us (b) turns HTML into a page (c) shows line numbers (d) saves our .html files
  32. 32.Which of these is a closing tag? (a) <title> (b) <body> (c) </li> (d) <li>
  33. 33.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  34. 34.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <h3>Rain today</h3>
    <h2>My best friend
    (a) </h3> (b) </u> (c) </h2> (d) </i>
  35. 35.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) moon.png (c) bus.jpg (d) A happy dog
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) Here is my best one. (c) All about me (d) Class 7 Blog
  37. 37.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <p> (d) <title>
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <h3>The red kite</h3>
    line 2: <h1>Hello, world!</h1>
    line 3: <strong>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  40. 40.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers

Answer key

  1. Fun facts
  2. </h2>
  3. a closing tag
  4. True
  5. <a href="about.html">
  6. <h1>
  7. Yes
  8. <
  9. an empty tag
  10. 4
  11. <h3>
  12. <h1>
  13. 1
  14. <h4>
  15. an empty tag
  16. about.html
  17. alt
  18. has a closing tag
  19. A happy dog
  20. in the body
  21. False
  22. No
  23. 1
  24. <style>
  25. <!DOCTYPE html>
  26. to leave notes
  27. opens it in a new tab
  28. True
  29. 6
  30. 3
  31. turns HTML into a page
  32. </li>
  33. True
  34. </h2>
  35. dog.jpg
  36. All about me
  37. a closing tag
  38. </h1>
  39. line 3
  40. numbers

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