← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 162 · 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 tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  2. 2.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  3. 3.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) news.html (b) Play games (c) maths.html (d) art.html
  4. 4.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  5. 5.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) My best friend (c) Hello, world!
  7. 7.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
  8. 8.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) about.html (b) contact.html (c) games.html (d) School news
  9. 9.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
  10. 10.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  11. 11.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  12. 12.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  13. 13.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
  14. 14.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <b> (d) <li>
  15. 15.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg
  16. 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
  18. 18.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  20. 20.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  22. 22.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  23. 23.Which of these is true of a code editor? (a) colours code to help us (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Match report (b) Cricket Club (c) Thanks for visiting. (d) body
  25. 25.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) </head> (d) <html>
  26. 26.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  27. 27.Which of these is an opening tag? (a) <p> (b) </title> (c) </b> (d) </body>
  28. 28.True or false: <title> has a closing tag. (a) False (b) True
  29. 29.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  30. 30.Which of these is an empty tag? (a) <p> (b) <h1> (c) <title> (d) <input>
  31. 31.Which of these is true of a web server? (a) opens web pages for us (b) colours code to help us (c) sends pages over the net (d) shows line numbers
  32. 32.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red</p>
  34. 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
  35. 35.True or false: <li> shows bullet points. (a) True (b) False
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="200">
  37. 37.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) School news (b) Art corner (c) href (d) about.html
  38. 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as 5 spaces (d) as a new line
  39. 39.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  40. 40.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. <h1>
  2. 6
  3. maths.html
  4. <!--
  5. a closing tag
  6. Fun facts
  7. </h3>
  8. games.html
  9. <h1>
  10. <a>
  11. to leave notes
  12. to describe the image
  13. <li>
  14. </h1>
  15. map.png
  16. opens it in a new tab
  17. 1
  18. in the head
  19. in a new tab
  20. <h2>
  21. 6
  22. href
  23. colours code to help us
  24. Match report
  25. <!DOCTYPE html>
  26. <ol>
  27. <p>
  28. True
  29. No
  30. <input>
  31. sends pages over the net
  32. Yes
  33. 2
  34. <a href="about.html">
  35. False
  36. 200
  37. Art corner
  38. as one space
  39. <ol>
  40. has a closing tag

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