← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 709 · 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.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  2. 2.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) news.html (b) Maths fun (c) href (d) Visit the site
  3. 3.Which of these goes in the head? (a) <ul> (b) <a> (c) <p> (d) <style>
  4. 4.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>The red kite</p>
    <p>Good morning!</p>
  5. 5.Which of these is an opening tag? (a) <h1> (b) </b> (c) </title> (d) </p>
  6. 6.🔗 Where does this link open?
    <a href="news.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  7. 7.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  8. 8.Which of these has a closing tag? (a) <br> (b) <img> (c) <ul> (d) <meta>
  9. 9.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
  10. 10.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <input> (d) <p>
  11. 11.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) Take the quiz (b) quiz.html (c) href (d) School news
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg
  13. 13.Which of these is an empty tag? (a) <input> (b) <h1> (c) <li> (d) <b>
  14. 14.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  15. 15.True or false: in <img>, width sets how wide it is. (a) True (b) False
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Easy snacks (b) index.html (c) We won by 5 runs. (d) Riya’s Recipes
  17. 17.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
  19. 19.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  20. 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  21. 21.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  23. 23.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
  25. 25.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  27. 27.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) href (b) contact.html (c) Visit the site (d) Maths fun
  28. 28.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <h3>My pets</h3>
    <p>I love mangoes.</p>
    <p>My pets</p>
  29. 29.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  32. 32.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) Art corner (b) quiz.html (c) href (d) School news
  33. 33.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) The full moon (b) Our school bus (c) moon.png (d) width
  35. 35.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  36. 36.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  37. 37.True or false: <ul> goes in the head. (a) False (b) True
  38. 38.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p>
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    (a) Rain today (b) I love mangoes. (c) My pets

Answer key

  1. to leave notes
  2. Visit the site
  3. <style>
  4. 3
  5. <h1>
  6. in a new tab
  7. in a new tab
  8. <ul>
  9. a web server
  10. <p>
  11. School news
  12. Birthday cake
  13. <input>
  14. a slash /
  15. True
  16. Riya’s Recipes
  17. has a closing tag
  18. <
  19. a web browser
  20. as one space
  21. 1
  22. 2
  23. 1
  24. <h1>
  25. in a new tab
  26. <h5>
  27. Visit the site
  28. 2
  29. an opening tag
  30. numbers
  31. 400
  32. Art corner
  33. a plain text editor
  34. The full moon
  35. in a new tab
  36. <li>
  37. False
  38. 4
  39. 5
  40. I love mangoes.

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