← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 41 · 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.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <p>My best friend</p>
  2. 2.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>Hello, world!</p>
  3. 3.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My pets</h2>
    <h2>The red kite</h2>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
  5. 5.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  6. 6.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
  8. 8.True or false: <h1> is an empty tag. (a) False (b) True
  9. 9.True or false: a code editor sends pages over the net. (a) False (b) True
  10. 10.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  12. 12.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h4>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
  15. 15.True or false: in <img>, height sets how tall it is. (a) False (b) True
  16. 16.Which of these is true of a web browser? (a) saves our .html files (b) has an address bar (c) answers page requests (d) hosts websites online
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Birthday cake (b) Map of India (c) map.png (d) width
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) My drawings (c) body (d) Art Gallery
  19. 19.True or false: HTML on its own cannot make a form. (a) True (b) False
  20. 20.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
  21. 21.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  23. 23.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  24. 24.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  25. 25.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  27. 27.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
  28. 28.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Cricket is fun. (c) The red kite (d) Our school trip
  29. 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  30. 30.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  31. 31.Which of these is an empty tag? (a) <title> (b) <b> (c) <meta> (d) <li>
  32. 32.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="250">
  34. 34.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  36. 36.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Stars shine<br>Rivers flow</p>
  38. 38.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  39. 39.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) about.html (b) quiz.html (c) School news (d) games.html
  40. 40.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. 1
  2. 1
  3. 4
  4. 6
  5. Yes
  6. a closing tag
  7. <h2>
  8. False
  9. False
  10. <!DOCTYPE html>
  11. 4
  12. <h6>
  13. 1
  14. <h1>
  15. True
  16. has an address bar
  17. Map of India
  18. My drawings
  19. False
  20. <!DOCTYPE html>
  21. in the body
  22. a web browser
  23. the body
  24. True
  25. an attribute
  26. bullets
  27. <img>
  28. Our school trip
  29. <ol>
  30. opens it in a new tab
  31. <meta>
  32. a paragraph
  33. 250
  34. <a>
  35. <h4>
  36. -->
  37. 4
  38. True
  39. quiz.html
  40. has a closing tag

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