← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 682 · 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.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
  2. 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  3. 3.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  4. 4.🔍 One closing tag is missing. Which one?
    <h2>Fun facts
    <i>My pets</i>
    <h3>Good morning!</h3>
    (a) </p> (b) </h3> (c) </h2> (d) </i>
  5. 5.Which of these is an opening tag? (a) </title> (b) </p> (c) <h1> (d) </li>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  7. 7.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
  8. 8.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <\i> (d) <i>
  9. 9.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Our school trip (b) The red kite (c) I love mangoes.
  10. 10.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Rain today</p>
    <h4>Our school trip</h4>
    <p>I love mangoes.</p>
  11. 11.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a link (d) a picture
  12. 12.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  13. 13.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  14. 14.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  15. 15.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Sky is blue</p>
  19. 19.🏷️ Which is the closing tag for <em>? (a) <em> (b) </em> (c) <\em> (d) <em/>
  20. 20.True or false: <ol> shows bullet points. (a) False (b) True
  21. 21.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <p>My best friend</p>
  23. 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  24. 24.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
  25. 25.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
  27. 27.True or false: a web browser turns HTML into a page. (a) True (b) False
  28. 28.Which of these is true of a web browser? (a) hosts websites online (b) stores a website’s files (c) turns HTML into a page (d) shows line numbers
  29. 29.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  30. 30.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  31. 31.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) hosts websites online (d) saves our .html files
  32. 32.True or false: <b> is an empty tag. (a) True (b) False
  33. 33.True or false: a code editor is where we type code. (a) False (b) True
  34. 34.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  35. 35.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  36. 36.Which of these goes in the head? (a) <h1> (b) <a> (c) <p> (d) <title>
  37. 37.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  38. 38.True or false: <ul> goes inside ul or ol. (a) True (b) False
  39. 39.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) Play games (b) maths.html (c) https://example.com (d) art.html

Answer key

  1. 3
  2. <ol>
  3. to leave notes
  4. </h2>
  5. <h1>
  6. 1
  7. src
  8. </i>
  9. I love mangoes.
  10. 2
  11. a line across the page
  12. a code editor
  13. in a new tab
  14. <h6>
  15. <h6>
  16. 6
  17. element
  18. 3
  19. </em>
  20. False
  21. as one space
  22. 3
  23. <a href="about.html">
  24. 3
  25. <h1>
  26. <h6>
  27. True
  28. turns HTML into a page
  29. opens it in a new tab
  30. in a new tab
  31. opens web pages for us
  32. False
  33. True
  34. <ul>
  35. href
  36. <title>
  37. 6
  38. False
  39. No
  40. https://example.com

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