← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 696 · 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.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
  2. 2.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  3. 3.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  4. 4.📋 What number does the browser show next to “Orange”?
    <ol start="9">
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  5. 5.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  6. 6.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  7. 7.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.True or false: <title> has a closing tag. (a) True (b) False
  9. 9.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <p>Hello, world!</p>
  10. 10.📋 What number does the browser show next to “Litchi”?
    <ol start="3">
      <li>Guava</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  11. 11.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>My pets</h2>
    <p>Hello, world!</p>
  12. 12.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  13. 13.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) about.html (b) https://example.com (c) Play games (d) contact.html
  14. 14.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
  15. 15.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) bus.jpg (b) fort.jpg (c) moon.png (d) The full moon
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue<br>Stars shine</p>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  18. 18.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="200">
    (a) dog.jpg (b) Map of India (c) cake.jpg (d) map.png
  21. 21.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
  22. 22.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
  23. 23.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  24. 24.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) saves our .html files (d) colours code to help us
  25. 25.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>I love mangoes.</p> -->
  26. 26.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
  28. 28.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) The red kite (c) Fun facts
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) width (b) The full moon (c) Our school bus (d) moon.png
  30. 30.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Art Gallery (c) Thanks for visiting. (d) Welcome!
  33. 33.True or false: a code editor opens web pages for us. (a) False (b) True
  34. 34.🔍 One closing tag is missing. Which one?
    <p>Fun facts</p>
    <b>Hello, world!</b>
    <h2>My best friend
    (a) </b> (b) </h2> (c) </small> (d) </p>
  35. 35.🔗 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
  36. 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  37. 37.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  38. 38.True or false: a web server is where we type code. (a) True (b) False
  39. 39.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) Play games (b) About us (c) games.html (d) href
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) body (c) All about me (d) Riya’s Recipes

Answer key

  1. <
  2. <a href="about.html">
  3. <a>
  4. 10
  5. a web browser
  6. <ul>
  7. an opening tag
  8. True
  9. 1
  10. 8
  11. 2
  12. False
  13. about.html
  14. </p>
  15. moon.png
  16. 5
  17. A tiger asleep
  18. an opening tag
  19. <img>
  20. map.png
  21. 1
  22. 1
  23. 1
  24. has an address bar
  25. 1
  26. a closing tag
  27. </em>
  28. My pets
  29. The full moon
  30. in the body
  31. href
  32. Welcome!
  33. False
  34. </h2>
  35. opens it in a new tab
  36. <ol>
  37. False
  38. False
  39. Play games
  40. All about me

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