← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 601 · 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 code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>My best friend</p>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
  4. 4.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    (a) My pets (b) Good morning! (c) My best friend
  5. 5.Which of these is an opening tag? (a) </b> (b) <li> (c) </body> (d) </p>
  6. 6.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
  7. 7.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) games.html (b) Take the quiz (c) href (d) School news
  8. 8.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  9. 9.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Fun facts</p>
  11. 11.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  12. 12.🔗 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
  13. 13.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <p>Rain today</p>
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
  16. 16.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) Our school bus (b) bus.jpg (c) An old fort (d) width
  18. 18.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  19. 19.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>My pets</p>
  20. 20.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  21. 21.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h1>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
  22. 22.True or false: in <img>, src shows if the image fails. (a) True (b) False
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) Our school bus (b) bus.jpg (c) An old fort (d) width
  24. 24.Which of these is a closing tag? (a) <body> (b) <h1> (c) <li> (d) </title>
  25. 25.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
  26. 26.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  27. 27.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
  28. 28.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  29. 29.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  30. 30.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) maths.html (b) Play games (c) contact.html (d) https://example.com
  31. 31.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Kites fly high</p>
  33. 33.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Art Gallery (b) Mars is red. (c) index.html (d) All about me
  35. 35.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) width (d) height
  36. 36.Which of these is a closing tag? (a) <h1> (b) </body> (c) <p> (d) <b>
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
  38. 38.True or false: <ul> is an empty tag. (a) False (b) True
  39. 39.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) about.html (c) href (d) Play games
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->

Answer key

  1. <a href="about.html">
  2. 3
  3. 1
  4. Good morning!
  5. <li>
  6. a web server
  7. School news
  8. <h1>
  9. 4
  10. 4
  11. <h5>
  12. opens it in a new tab
  13. in the head
  14. 5
  15. 2
  16. <!DOCTYPE html>
  17. Our school bus
  18. an attribute
  19. 4
  20. No
  21. <h1>
  22. False
  23. Our school bus
  24. </title>
  25. to leave notes
  26. <h5>
  27. starts a new line
  28. <!--
  29. a closing tag
  30. contact.html
  31. to describe the image
  32. 3
  33. bullets
  34. Art Gallery
  35. src
  36. </body>
  37. 1
  38. False
  39. Play games
  40. 1

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