← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 103 · 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.💬 Does the browser show comments on the page? (a) Yes (b) No
  2. 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  3. 3.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  4. 4.Which of these is an empty tag? (a) <br> (b) <li> (c) <p> (d) <h1>
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  6. 6.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Fun facts (c) Rain today (d) Hello, world!
  7. 7.True or false: <ul> has a closing tag. (a) False (b) True
  8. 8.True or false: a code editor has an address bar. (a) False (b) True
  9. 9.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  11. 11.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  12. 12.True or false: <input> has a closing tag. (a) True (b) False
  13. 13.True or false: in <img>, width sets how tall it is. (a) True (b) False
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="200">
  15. 15.Which of these is an opening tag? (a) <body> (b) </b> (c) </body> (d) </h1>
  16. 16.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
  17. 17.True or false: <ul> lists steps in order. (a) False (b) True
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Thanks for visiting. (c) index.html (d) Art Gallery
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today
    line 2: <strong>I love mangoes.</strong>
    line 3: <small>Cricket is fun.</small>
    (a) line 3 (b) line 1 (c) line 2
  20. 20.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) Play games (b) href (c) About us (d) games.html
  21. 21.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  22. 22.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <img>
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) width (b) A happy dog (c) dog.jpg (d) The full moon
  24. 24.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) opens web pages for us (d) has an address bar
  25. 25.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  26. 26.True or false: in <img>, src shows if the image fails. (a) True (b) False
  27. 27.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  28. 28.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    (a) Our school trip (b) Good morning! (c) Hello, world! (d) The red kite
  29. 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
    </ul>
  31. 31.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
  32. 32.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
  33. 33.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) href (b) about.html (c) Maths fun (d) Visit the site
  34. 34.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) https://example.com (b) Contact us (c) maths.html (d) contact.html
  36. 36.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  37. 37.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  39. 39.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) Birthday cake (b) width (c) cake.jpg (d) A happy dog

Answer key

  1. No
  2. <ol>
  3. <a href="about.html">
  4. <br>
  5. 200
  6. Rain today
  7. True
  8. False
  9. a line across the page
  10. 400
  11. opens it in a new tab
  12. False
  13. False
  14. 200
  15. <body>
  16. </u>
  17. False
  18. Art Gallery
  19. line 1
  20. Play games
  21. bullets
  22. <title>
  23. A happy dog
  24. stores a website’s files
  25. a slash /
  26. False
  27. <a>
  28. Hello, world!
  29. No
  30. 2
  31. a paragraph
  32. 2
  33. Visit the site
  34. an opening tag
  35. contact.html
  36. <ul>
  37. <!--
  38. 2
  39. numbers
  40. Birthday cake

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