← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 664 · 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.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  2. 2.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) Fun facts (b) My pets (c) Our school trip (d) I love mangoes.
  3. 3.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  4. 4.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  5. 5.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  6. 6.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  7. 7.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  8. 8.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) All about me (d) Mars is red.
  9. 9.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) stores a website’s files (d) colours code to help us
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Space Facts (b) We won by 5 runs. (c) body (d) All about me
  11. 11.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) href (b) art.html (c) Take the quiz (d) Play games
  12. 12.True or false: <img> has a closing tag. (a) True (b) False
  13. 13.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) https://example.com
  15. 15.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) games.html (c) quiz.html (d) Take the quiz
  16. 16.🔗 Where does this link open?
    <a href="maths.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  17. 17.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
  19. 19.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  20. 20.📄 Can HTML on its own make headings? (a) No (b) Yes
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Space Facts (c) index.html (d) Easy snacks
  22. 22.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.True or false: <ul> goes in the body. (a) False (b) True
  25. 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  27. 27.Which of these goes in the head? (a) <ul> (b) <img> (c) <h1> (d) <link rel="stylesheet">
  28. 28.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
  29. 29.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Good morning! (c) The red kite
  30. 30.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
  31. 31.True or false: in <img>, alt describes the picture. (a) False (b) True
  32. 32.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  33. 33.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  34. 34.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
  35. 35.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  36. 36.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) </head> (d) <!DOCTYPE html>
  37. 37.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>My pets</p>
    <p>My pets</p>
  38. 38.True or false: <a> goes in the body. (a) True (b) False
  39. 39.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>

Answer key

  1. True
  2. Fun facts
  3. bullets
  4. 1
  5. a code editor
  6. True
  7. <h6>
  8. All about me
  9. stores a website’s files
  10. All about me
  11. Take the quiz
  12. False
  13. <!DOCTYPE html>
  14. Maths fun
  15. news.html
  16. in the same tab
  17. an opening tag
  18. alt
  19. 6
  20. Yes
  21. Space Facts
  22. an opening tag
  23. an opening tag
  24. True
  25. No
  26. bullets
  27. <link rel="stylesheet">
  28. 3
  29. Rain today
  30. width
  31. True
  32. Yes
  33. bullets
  34. 2
  35. an attribute
  36. <!DOCTYPE html>
  37. 4
  38. True
  39. <ul>
  40. 5

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