← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 208 · 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 one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing</p>
  3. 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
  5. 5.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  6. 6.Which of these has a closing tag? (a) <b> (b) <img> (c) <meta> (d) <hr>
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  10. 10.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  11. 11.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  12. 12.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  13. 13.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) href (b) Maths fun (c) quiz.html (d) Visit the site
  14. 14.Which of these goes in the head? (a) <ul> (b) <a> (c) <img> (d) <title>
  15. 15.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  16. 16.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  17. 17.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  18. 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) https://example.com (b) href (c) About us (d) Play games
  20. 20.🔗 Which words do you click on?
    <a href="maths.html">School news</a>
    (a) maths.html (b) href (c) School news (d) Take the quiz
  21. 21.True or false: in <img>, src names the picture file. (a) True (b) False
  22. 22.Which of these is an opening tag? (a) <title> (b) </p> (c) </body> (d) </title>
  23. 23.True or false: <p> goes in the body. (a) False (b) True
  24. 24.🔗 Where does this link open?
    <a href="games.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  25. 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  26. 26.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  27. 27.True or false: HTML on its own can make links to pages. (a) True (b) False
  28. 28.🔍 One closing tag is missing. Which one?
    <strong>Good morning!
    <u>Cricket is fun.</u>
    <h1>The red kite</h1>
    (a) </u> (b) </h1> (c) </strong> (d) </h3>
  29. 29.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>My pets</p>
  30. 30.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  31. 31.🏷️ Which is the closing tag for <b>? (a) <b> (b) <\b> (c) </b> (d) <b/>
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets</h1>
    line 2: <b>Cricket is fun.</b>
    line 3: <u>Hello, world!
    (a) line 2 (b) line 3 (c) line 1
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) Class 7 Blog (c) We won by 5 runs. (d) All about me
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
  35. 35.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  36. 36.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
  37. 37.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h3>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
  38. 38.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>The red kite</p>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
  39. 39.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) </body> (b) <!DOCTYPE html>
  40. 40.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures

Answer key

  1. a web browser
  2. 2
  3. in the head
  4. 3
  5. 2
  6. <b>
  7. <h2>
  8. 250
  9. 2
  10. <ol>
  11. <img>
  12. a code editor
  13. Visit the site
  14. <title>
  15. <a href="about.html">
  16. 2
  17. a slash /
  18. in the head
  19. Play games
  20. School news
  21. True
  22. <title>
  23. True
  24. in a new tab
  25. Yes
  26. True
  27. True
  28. </strong>
  29. 1
  30. a line across the page
  31. </b>
  32. line 3
  33. All about me
  34. 1
  35. No
  36. <h1>
  37. <h2>
  38. 2
  39. <!DOCTYPE html>
  40. to leave notes

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