← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 698 · 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 the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
  2. 2.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Hello, world!</h2>
    <h4>The red kite</h4>
    <p>Hello, world!</p>
  3. 3.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) School news (b) quiz.html (c) art.html (d) news.html
  4. 4.True or false: <ul> goes in the body. (a) True (b) False
  5. 5.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  7. 7.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  8. 8.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  9. 9.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
  10. 10.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <b>
  11. 11.True or false: <p> goes in the head. (a) False (b) True
  12. 12.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) contact.html (c) about.html (d) Take the quiz
  13. 13.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <!DOCTYPE html> (b) <head>
  14. 14.🔠 Are headings shown in bold by default? (a) Yes (b) No
  15. 15.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h1>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  16. 16.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) news.html (b) href (c) Visit the site (d) Contact us
  17. 17.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) contact.html (b) about.html (c) Take the quiz (d) games.html
  18. 18.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
  19. 19.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  20. 20.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  21. 21.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <ul> (d) <link rel="stylesheet">
  22. 22.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
  23. 23.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>My best friend</p>
    (a) Our school trip (b) Good morning! (c) Fun facts (d) My best friend
  24. 24.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  25. 25.Which of these is an opening tag? (a) <h1> (b) </title> (c) </h1> (d) </b>
  26. 26.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  27. 27.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  28. 28.True or false: <li> is one item of a list. (a) False (b) True
  29. 29.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  30. 30.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  31. 31.True or false: in <img>, height describes the picture. (a) True (b) False
  32. 32.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Hello, world! (c) The red kite
  33. 33.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
  34. 34.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  35. 35.Which of these goes in the head? (a) <h1> (b) <a> (c) <table> (d) <style>
  36. 36.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <em>Cricket is fun.</em>
    line 2: <p>The red kite
    line 3: <h2>Hello, world!</h2>
    (a) line 3 (b) line 2 (c) line 1
  38. 38.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  39. 39.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>My best friend</h2>
    <p>My pets</p>
    <h2>Good morning!</h2>
  40. 40.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. <h6>
  2. 3
  3. art.html
  4. True
  5. an opening tag
  6. to describe the image
  7. <a href="about.html">
  8. in the same tab
  9. <h1>
  10. <b>
  11. False
  12. about.html
  13. <!DOCTYPE html>
  14. Yes
  15. <h1>
  16. Contact us
  17. games.html
  18. a line across the page
  19. Yes
  20. an opening tag
  21. <ul>
  22. the body
  23. Good morning!
  24. 11
  25. <h1>
  26. numbers
  27. 6
  28. True
  29. Yes
  30. a paragraph
  31. False
  32. Fun facts
  33. <!DOCTYPE html>
  34. True
  35. <style>
  36. src
  37. line 2
  38. href
  39. 2
  40. an empty tag

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