← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 447 · 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 items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  2. 2.True or false: <li> lists things in any order. (a) False (b) True
  3. 3.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
  4. 4.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>Our school trip</p>
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  6. 6.Which of these has a closing tag? (a) <input> (b) <br> (c) <img> (d) <p>
  7. 7.💾 A web page file usually ends with which extension? (a) .html (b) .png (c) .txt (d) .mp3
  8. 8.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
  9. 9.True or false: <title> goes in the body. (a) False (b) True
  10. 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
  12. 12.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
    <h3>Our school trip</h3>
    <h4>Hello, world!</h4>
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Easy snacks (b) Thanks for visiting. (c) Riya’s Recipes (d) index.html
  14. 14.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Visit the site (b) Contact us (c) href (d) contact.html
  15. 15.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) </em> (d) <em>
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) My pets (b) Good morning! (c) Fun facts
  17. 17.True or false: a web browser shows line numbers. (a) False (b) True
  18. 18.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg
  19. 19.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h2>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
  20. 20.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) Take the quiz (b) href (c) School news (d) art.html
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
  22. 22.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  23. 23.True or false: in <img>, src tells which image to load. (a) False (b) True
  24. 24.Which of these is a closing tag? (a) </p> (b) <p> (c) <h1> (d) <title>
  25. 25.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  26. 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  27. 27.True or false: HTML on its own can make headings. (a) False (b) True
  28. 28.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
  29. 29.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  30. 30.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  31. 31.True or false: in <img>, src names the picture file. (a) False (b) True
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A tiger asleep (b) width (c) A red kite (d) tiger.jpg
  33. 33.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  34. 34.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Good morning!</p>
    <h4>Our school trip</h4>
  35. 35.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  36. 36.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    (a) Hello, world! (b) The red kite (c) Our school trip
  37. 37.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  38. 38.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h4>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
  40. 40.True or false: in <img>, alt describes the picture. (a) True (b) False

Answer key

  1. 2
  2. False
  3. a code editor
  4. 6
  5. opens it in a new tab
  6. <p>
  7. .html
  8. alt
  9. False
  10. an attribute
  11. 1
  12. 4
  13. Riya’s Recipes
  14. Contact us
  15. </em>
  16. Good morning!
  17. False
  18. dog.jpg
  19. <h6>
  20. School news
  21. 1
  22. bullets
  23. True
  24. </p>
  25. <a href="about.html">
  26. No
  27. True
  28. <li>
  29. to leave notes
  30. href
  31. True
  32. A tiger asleep
  33. <!--
  34. 2
  35. <
  36. Our school trip
  37. 3
  38. <h6>
  39. 150
  40. True

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