← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 990 · 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.True or false: a web server colours code to help us. (a) False (b) True
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>I love mangoes.</p> -->
  3. 3.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Orange</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  4. 4.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) https://example.com (c) href (d) Art corner
  5. 5.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  6. 6.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  7. 7.📄 Can HTML on its own make headings? (a) No (b) Yes
  8. 8.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  9. 9.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  10. 10.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) src (d) height
  11. 11.Which of these is true of a web server? (a) colours code to help us (b) sends pages over the net (c) turns HTML into a page (d) is where we type code
  12. 12.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  14. 14.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  15. 15.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>Cricket is fun.</h4>
    <h4>Good morning!</h4>
    <h2>Cricket is fun.</h2>
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    (a) Our school trip (b) My best friend (c) I love mangoes.
  17. 17.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  18. 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  19. 19.Which of these is a closing tag? (a) <li> (b) <h1> (c) </b> (d) <title>
  20. 20.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  22. 22.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  23. 23.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <h2>My best friend</h2>
  24. 24.Which of these goes in the head? (a) <ul> (b) <table> (c) <meta charset="utf-8"> (d) <h1>
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!
    line 2: <h1>Good morning!</h1>
    line 3: <i>My best friend</i>
    (a) line 2 (b) line 3 (c) line 1
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="100">
  27. 27.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  28. 28.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <br>
  29. 29.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) href (b) maths.html (c) About us (d) Contact us
  30. 30.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
  31. 31.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>The red kite</p>
    <h2>My pets</h2>
    <p>The red kite</p>
  32. 32.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) contact.html (b) games.html (c) Art corner (d) about.html
  33. 33.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) width (b) A tiger asleep (c) tiger.jpg (d) A red kite
  35. 35.Which of these is an empty tag? (a) <b> (b) <p> (c) <li> (d) <input>
  36. 36.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) index.html (c) All about me (d) My Hobbies
  38. 38.True or false: in <img>, alt describes the picture. (a) False (b) True
  39. 39.🔗 Where does this link open?
    <a href="news.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  40. 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No

Answer key

  1. False
  2. 1
  3. 4
  4. Maths fun
  5. No
  6. False
  7. Yes
  8. <ul>
  9. has a closing tag
  10. alt
  11. sends pages over the net
  12. a closing tag
  13. bullets
  14. in a new tab
  15. 4
  16. I love mangoes.
  17. a web server
  18. <li>
  19. </b>
  20. <a href="about.html">
  21. 3
  22. a code editor
  23. 3
  24. <meta charset="utf-8">
  25. line 1
  26. 100
  27. <li>
  28. <p>
  29. About us
  30. a line across the page
  31. 2
  32. games.html
  33. has a closing tag
  34. A tiger asleep
  35. <input>
  36. <h6>
  37. My Hobbies
  38. True
  39. in the same tab
  40. Yes

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