← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 580 · 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>My pets</h1>
    <p>Fun facts</p>
    <p>Good morning!</p>
  2. 2.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing<br>Kites fly high<br>Roses are red</p>
  4. 4.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) Contact us (b) news.html (c) art.html (d) quiz.html
  5. 5.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) A happy dog (b) dog.jpg (c) The full moon (d) width
  7. 7.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>Good morning!</p>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
  9. 9.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.True or false: <h1> is an empty tag. (a) True (b) False
  11. 11.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) A tiger asleep (c) fort.jpg (d) width
  13. 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
  15. 15.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as a dot (d) as 5 spaces
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) Play games (c) contact.html (d) Take the quiz
  17. 17.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  18. 18.True or false: <li> is one item of a list. (a) False (b) True
  19. 19.📝 What does <p> make? (a) a paragraph (b) a table (c) a link (d) a picture
  20. 20.📄 Can HTML on its own make tables? (a) Yes (b) No
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    (a) Fun facts (b) Good morning! (c) I love mangoes. (d) Rain today
  22. 22.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  23. 23.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) games.html (b) Visit the site (c) quiz.html (d) about.html
  24. 24.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  25. 25.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Art Gallery (b) Thanks for visiting. (c) index.html (d) Match report
  28. 28.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <html> (b) <body>
  29. 29.True or false: in <img>, src sets how tall it is. (a) False (b) True
  30. 30.📄 Can HTML on its own make a form? (a) No (b) Yes
  31. 31.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>The red kite</h3>
    <h2>My best friend</h2>
    <p>The red kite</p>
    <h2>Rain today</h2>
  32. 32.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  34. 34.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) speed (d) structure
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h6>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  36. 36.Which of these is true of a web browser? (a) shows line numbers (b) colours code to help us (c) turns HTML into a page (d) sends pages over the net
  37. 37.📝 What do we need to write HTML? (a) a plain text editor (b) a printer (c) a paintbrush (d) a microphone
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="400">
    (a) moon.png (b) width (c) The full moon (d) Our school bus
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) width (c) A happy dog (d) Birthday cake
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) kite.png (b) Map of India (c) width (d) A red kite

Answer key

  1. 1
  2. an attribute
  3. 5
  4. art.html
  5. has a closing tag
  6. A happy dog
  7. 4
  8. 2
  9. in the body
  10. False
  11. in the head
  12. An old fort
  13. in the head
  14. Markup
  15. as one space
  16. Take the quiz
  17. <!--
  18. True
  19. a paragraph
  20. Yes
  21. I love mangoes.
  22. in the same tab
  23. quiz.html
  24. <ul>
  25. an opening tag
  26. Yes
  27. Art Gallery
  28. <html>
  29. False
  30. Yes
  31. 4
  32. in the body
  33. 2
  34. structure
  35. <h1>
  36. turns HTML into a page
  37. a plain text editor
  38. The full moon
  39. Birthday cake
  40. A red kite

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