← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 290 · 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 code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
  2. 2.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  3. 3.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  4. 4.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.</strong>
    <p>Fun facts
    <u>Hello, world!</u>
    (a) </strong> (b) </h1> (c) </p> (d) </u>
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My Hobbies (b) index.html (c) Welcome! (d) Here is my best one.
  6. 6.🔠 Are headings shown in bold by default? (a) No (b) Yes
  7. 7.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>My best friend</h4>
    <p>Good morning!</p>
  8. 8.True or false: <meta> has a closing tag. (a) True (b) False
  9. 9.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>I love mangoes.</h4>
    <p>I love mangoes.</p>
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) Easy snacks (c) I like to read. (d) body
  11. 11.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.
    <strong>Hello, world!</strong>
    <h2>My best friend</h2>
    (a) </strong> (b) </u> (c) </h2> (d) </h3>
  12. 12.Which of these goes in the head? (a) <p> (b) <style> (c) <h1> (d) <img>
  13. 13.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  14. 14.Which of these is an opening tag? (a) <h1> (b) </title> (c) </h1> (d) </body>
  15. 15.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  17. 17.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Hello, world!</p>
  18. 18.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    (a) Fun facts (b) My best friend (c) I love mangoes. (d) Hello, world!
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  20. 20.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) shows pages from the web (d) saves our .html files
  21. 21.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <h2>Cricket is fun.</h2>
    <h2>Good morning!</h2>
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today</h1>
    line 2: <u>I love mangoes.</u>
    line 3: <p>Fun facts
    (a) line 2 (b) line 1 (c) line 3
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    (a) I love mangoes. (b) Rain today (c) Fun facts (d) The red kite
  24. 24.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Roses are red</p>
  26. 26.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) kite.png (b) tiger.jpg (c) A tiger asleep (d) map.png
  27. 27.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  28. 28.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) High Tech (c) Hot Tags (d) Home Text
  29. 29.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h5>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
  30. 30.💬 Does the browser show comments on the page? (a) No (b) Yes
  31. 31.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
  33. 33.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
  34. 34.Which of these is an opening tag? (a) </li> (b) </body> (c) </h1> (d) <li>
  35. 35.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort
  37. 37.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  38. 38.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) Play games (b) Take the quiz (c) https://example.com (d) href
  39. 39.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  40. 40.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>

Answer key

  1. <a href="about.html">
  2. <h5>
  3. a web browser
  4. </p>
  5. My Hobbies
  6. Yes
  7. 2
  8. False
  9. 2
  10. Easy snacks
  11. </u>
  12. <style>
  13. No
  14. <h1>
  15. <h1>
  16. numbers
  17. 5
  18. Hello, world!
  19. A red kite
  20. shows pages from the web
  21. 4
  22. line 3
  23. Rain today
  24. <h1>
  25. 3
  26. tiger.jpg
  27. numbers
  28. HyperText
  29. <h1>
  30. No
  31. <!--
  32. <h1>
  33. a slash /
  34. <li>
  35. <
  36. An old fort
  37. No
  38. Take the quiz
  39. <ul>
  40. <ol>

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