← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 594 · 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.📝 What does <p> make? (a) a paragraph (b) a table (c) a link (d) a picture
  2. 2.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  3. 3.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) My pets (b) Our school trip (c) I love mangoes.
  5. 5.Which of these is true of a web browser? (a) has an address bar (b) is where we type code (c) stores a website’s files (d) colours code to help us
  6. 6.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) src (d) height
  7. 7.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
  8. 8.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  9. 9.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
  10. 10.Which of these is an opening tag? (a) </body> (b) <h1> (c) </title> (d) </h1>
  11. 11.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  12. 12.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
  13. 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg
  16. 16.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  17. 17.Which of these is a closing tag? (a) <h1> (b) <body> (c) <li> (d) </title>
  18. 18.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
  19. 19.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
  20. 20.Which of these is true of a code editor? (a) colours code to help us (b) opens web pages for us (c) shows pages from the web (d) turns HTML into a page
  21. 21.Which of these is an opening tag? (a) </p> (b) <b> (c) </li> (d) </title>
  22. 22.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
  23. 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  25. 25.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  26. 26.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  27. 27.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  28. 28.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <h2>I love mangoes.</h2>
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Kites fly high</p>
  30. 30.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) pixels (d) tags
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  32. 32.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
  33. 33.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <h2>The red kite</h2>
    <h2>Cricket is fun.</h2>
  34. 34.True or false: <br> is an empty tag. (a) False (b) True
  35. 35.Which of these is true of a web browser? (a) answers page requests (b) is where we type code (c) shows line numbers (d) opens web pages for us
  36. 36.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) </h1> (d) <h1>
  37. 37.True or false: <li> is an empty tag. (a) False (b) True
  38. 38.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
  39. 39.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    (a) The red kite (b) Hello, world! (c) My best friend (d) Cricket is fun.
  40. 40.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>

Answer key

  1. a paragraph
  2. <a href="about.html">
  3. an opening tag
  4. Our school trip
  5. has an address bar
  6. alt
  7. HyperText
  8. False
  9. 2
  10. <h1>
  11. has a closing tag
  12. a code editor
  13. a slash /
  14. <h2>
  15. A tiger asleep
  16. <!DOCTYPE html>
  17. </title>
  18. Language
  19. </p>
  20. colours code to help us
  21. <b>
  22. to describe the image
  23. in the head
  24. <!--
  25. <ol>
  26. a web browser
  27. a web browser
  28. 3
  29. 3
  30. tags
  31. 6
  32. 4
  33. 3
  34. True
  35. opens web pages for us
  36. </h1>
  37. False
  38. src
  39. Cricket is fun.
  40. <ol>

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