← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 858 · 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.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  2. 2.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a paintbrush (d) a microphone
  3. 3.🔍 Which is the odd one out? (a) hosts websites online (b) shows line numbers (c) stores a website’s files (d) sends pages over the net
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="50">
  5. 5.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  6. 6.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  7. 7.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) https://example.com (c) art.html (d) maths.html
  8. 8.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Art corner (b) href (c) news.html (d) Maths fun
  9. 9.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  10. 10.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a paint program (d) a music player
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
  12. 12.Which of these is a closing tag? (a) <body> (b) <h1> (c) </p> (d) <title>
  13. 13.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) wires (d) keys
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) https://example.com (c) Visit the site (d) href
  15. 15.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>Our school trip</p>
  17. 17.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) Our school trip (c) Fun facts (d) My pets
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  19. 19.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) games.html (b) about.html (c) contact.html (d) School news
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Our school trip</h2>
    <h2>Hello, world!</h2>
  21. 21.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  23. 23.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h4>
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  25. 25.True or false: in <img>, height sets how tall it is. (a) True (b) False
  26. 26.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing</p>
  28. 28.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  29. 29.True or false: <p> is an empty tag. (a) False (b) True
  30. 30.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  32. 32.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
  33. 33.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) </body> (b) <html>
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  35. 35.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  36. 36.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  37. 37.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  38. 38.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  39. 39.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  40. 40.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom

Answer key

  1. to describe the image
  2. a plain text editor
  3. shows line numbers
  4. 50
  5. <ol>
  6. numbers
  7. https://example.com
  8. Maths fun
  9. <
  10. a web browser
  11. <h1>
  12. </p>
  13. tags
  14. Visit the site
  15. href
  16. 2
  17. Our school trip
  18. element
  19. games.html
  20. 3
  21. has a closing tag
  22. src
  23. <h1>
  24. 100
  25. True
  26. 1
  27. 2
  28. the body
  29. False
  30. <ul>
  31. 2
  32. 2
  33. <html>
  34. <h2>
  35. <a href="about.html">
  36. opens it in a new tab
  37. an attribute
  38. <h1>
  39. Yes
  40. on the browser tab

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