← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 318 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Birds sing<br>Sky is blue</p>
  2. 2.💬 Does the browser show comments on the page? (a) No (b) Yes
  3. 3.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.Which of these goes in the body? (a) <p> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
  5. 5.Which of these is true of a code editor? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) colours code to help us
  6. 6.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  7. 7.Which of these is an opening tag? (a) </h1> (b) </li> (c) <li> (d) </body>
  8. 8.True or false: <ul> shows bullet points. (a) True (b) False
  9. 9.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <h1>Rain today
    <p>My pets</p>
    (a) </p> (b) </em> (c) </h1> (d) </h2>
  10. 10.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  11. 11.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
  12. 12.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Good morning! (c) My pets
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  14. 14.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Hello, world!</h4>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <p>Our school trip</p>
    line 2: <em>Rain today</em>
    line 3: <u>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  16. 16.True or false: <li> goes inside ul or ol. (a) True (b) False
  17. 17.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) href (b) Art corner (c) contact.html (d) School news
  19. 19.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
  21. 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h2>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
  22. 22.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip
    line 2: <i>My pets</i>
    line 3: <h1>The red kite</h1>
    (a) line 3 (b) line 2 (c) line 1
  25. 25.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  26. 26.🔍 One closing tag is missing. Which one?
    <small>I love mangoes.
    <h3>Hello, world!</h3>
    <u>Cricket is fun.</u>
    (a) </h3> (b) </h2> (c) </u> (d) </small>
  27. 27.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <h3>Our school trip</h3>
    <p>I love mangoes.</p>
  28. 28.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  29. 29.True or false: HTML on its own can show paragraphs. (a) False (b) True
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg
  31. 31.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) href (c) Art corner (d) https://example.com
  32. 32.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
  33. 33.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  35. 35.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
  36. 36.True or false: HTML on its own cannot make headings. (a) False (b) True
  37. 37.📄 Can HTML on its own make tables? (a) No (b) Yes
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  39. 39.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>Rain today</h2>
    <p>Good morning!</p>
    <p>Good morning!</p>
  40. 40.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (

Answer key

  1. 4
  2. No
  3. an opening tag
  4. <p>
  5. colours code to help us
  6. numbers
  7. <li>
  8. True
  9. </h1>
  10. to leave notes
  11. 4
  12. My pets
  13. Yes
  14. 2
  15. line 3
  16. True
  17. <h1>
  18. Art corner
  19. <h1>
  20. 1
  21. <h6>
  22. Yes
  23. 1
  24. line 1
  25. a web browser
  26. </small>
  27. 2
  28. <a href="about.html">
  29. True
  30. An old fort
  31. Maths fun
  32. 2
  33. a web browser
  34. 3
  35. <h2>
  36. False
  37. Yes
  38. 2
  39. 4
  40. <

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