← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 936 · 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 tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  3. 3.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    (a) I love mangoes. (b) Hello, world! (c) My best friend (d) The red kite
  4. 4.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  5. 5.True or false: in <img>, src is read by screen readers. (a) True (b) False
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  7. 7.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) moon.png (b) The full moon (c) bus.jpg (d) fort.jpg
  9. 9.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
  10. 10.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  11. 11.Which of these is true of a web server? (a) hosts websites online (b) is where we type code (c) saves our .html files (d) has an address bar
  12. 12.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  13. 13.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  14. 14.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  15. 15.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  16. 16.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>The red kite</p>
    <h3>Fun facts</h3>
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  18. 18.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  20. 20.🏷️ Which is the closing tag for <small>? (a) <small> (b) <small/> (c) <\small> (d) </small>
  21. 21.Which of these is an opening tag? (a) </h1> (b) </b> (c) </title> (d) <b>
  22. 22.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) games.html (c) Take the quiz (d) School news
  23. 23.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
  25. 25.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  26. 26.Which of these is an opening tag? (a) <p> (b) </title> (c) </h1> (d) </p>
  27. 27.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) maths.html (c) https://example.com (d) art.html
  28. 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  30. 30.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
    <h2>Good morning!</h2>
    <h2>The red kite</h2>
  31. 31.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  32. 32.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  33. 33.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
  34. 34.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
  35. 35.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    (a) Fun facts (b) Rain today (c) The red kite (d) Our school trip
  37. 37.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  38. 38.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg
  40. 40.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) Art corner (c) href (d) School news

Answer key

  1. <a>
  2. 1
  3. The red kite
  4. <ol>
  5. False
  6. 3
  7. 4
  8. moon.png
  9. href
  10. opens it in a new tab
  11. hosts websites online
  12. <h6>
  13. False
  14. <ol>
  15. the body
  16. 2
  17. <h6>
  18. in the body
  19. 200
  20. </small>
  21. <b>
  22. School news
  23. a paragraph
  24. 4
  25. a slash /
  26. <p>
  27. https://example.com
  28. an opening tag
  29. a code editor
  30. 1
  31. <h5>
  32. 2
  33. starts a new line
  34. <
  35. <!--
  36. The red kite
  37. No
  38. to describe the image
  39. A tiger asleep
  40. Art corner

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