← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 882 · 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 attribute of <img> shows if the image fails? (a) src (b) alt (c) height (d) width
  2. 2.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine</p>
  6. 6.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) has an address bar (d) hosts websites online
  7. 7.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  8. 8.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) src (d) height
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ul>
  10. 10.True or false: HTML on its own can add up two numbers. (a) False (b) True
  11. 11.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  12. 12.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  13. 13.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
  14. 14.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  15. 15.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
  16. 16.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) Contact us (b) https://example.com (c) About us (d) href
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>My pets</p>
    (a) My pets (b) I love mangoes. (c) Rain today (d) The red kite
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My Hobbies (b) Easy snacks (c) Here is my best one. (d) index.html
  19. 19.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
  20. 20.True or false: a code editor is where we type code. (a) False (b) True
  21. 21.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  22. 22.🔍 Which is the odd one out? (a) answers page requests (b) is where we type code (c) sends pages over the net (d) hosts websites online
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Planets (b) index.html (c) Class 7 Blog (d) Thanks for visiting.
  24. 24.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  25. 25.Which of these has a closing tag? (a) <br> (b) <meta> (c) <input> (d) <title>
  26. 26.🔍 Which is the odd one out? (a) opens web pages for us (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
  27. 27.True or false: in <img>, alt describes the picture. (a) False (b) True
  28. 28.True or false: <hr> has a closing tag. (a) False (b) True
  29. 29.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  30. 30.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  31. 31.True or false: <p> is an empty tag. (a) True (b) False
  32. 32.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  33. 33.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
  34. 34.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  35. 35.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  36. 36.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  37. 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  38. 38.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Good morning!</p>
  39. 39.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) kite.png (b) fort.jpg (c) tiger.jpg (d) An old fort
  40. 40.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>

Answer key

  1. alt
  2. the body
  3. <h2>
  4. <h1>
  5. 2
  6. has an address bar
  7. starts a new line
  8. height
  9. 6
  10. False
  11. <ol>
  12. 13
  13. </body>
  14. a closing tag
  15. an attribute
  16. About us
  17. Rain today
  18. My Hobbies
  19. <h1>
  20. True
  21. <!DOCTYPE html>
  22. is where we type code
  23. Class 7 Blog
  24. <ul>
  25. <title>
  26. opens web pages for us
  27. True
  28. False
  29. numbers
  30. bullets
  31. False
  32. a code editor
  33. alt
  34. <h1>
  35. an empty tag
  36. 2
  37. opens it in a new tab
  38. 4
  39. fort.jpg
  40. <h5>

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