← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 201 · 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 is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  3. 3.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  4. 4.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  5. 5.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small> (d) <small/>
  6. 6.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  7. 7.True or false: HTML on its own cannot make a form. (a) True (b) False
  8. 8.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  9. 9.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) quiz.html (b) news.html (c) games.html (d) School news
  10. 10.🔗 Where does this link open?
    <a href="https://example.com">Visit the site</a>
    (a) in a new tab (b) in the same tab
  11. 11.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) alt (d) width
  12. 12.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) I love mangoes. (c) The red kite (d) Good morning!
  13. 13.Which of these has a closing tag? (a) <h1> (b) <img> (c) <meta> (d) <input>
  14. 14.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  15. 15.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  16. 16.Which of these is an opening tag? (a) </h1> (b) </p> (c) </body> (d) <title>
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) body (c) Space Facts (d) Welcome!
  18. 18.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) saves our .html files (d) shows line numbers
  19. 19.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Thanks for visiting. (c) Easy snacks (d) My Hobbies
  20. 20.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  22. 22.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>The red kite</h3>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Birds sing</p>
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.💬 Does the browser show comments on the page? (a) No (b) Yes
  27. 27.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h5>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
  28. 28.True or false: <ul> shows bullet points. (a) False (b) True
  29. 29.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) Maths fun (b) about.html (c) games.html (d) contact.html
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  31. 31.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  32. 32.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  33. 33.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Rain today</p>
    <h2>My best friend</h2>
  34. 34.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
  35. 35.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort
  38. 38.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <strong>Cricket is fun.</strong>
    line 2: <u>Rain today</u>
    line 3: <h3>I love mangoes.
    (a) line 2 (b) line 3 (c) line 1
  40. 40.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph

Answer key

  1. </h3>
  2. Yes
  3. True
  4. in the body
  5. </small>
  6. <ul>
  7. False
  8. a code editor
  9. news.html
  10. in the same tab
  11. src
  12. Good morning!
  13. <h1>
  14. 1
  15. 3
  16. <title>
  17. Welcome!
  18. turns HTML into a page
  19. Easy snacks
  20. -->
  21. 5
  22. 3
  23. 150
  24. 3
  25. Yes
  26. No
  27. <h6>
  28. True
  29. games.html
  30. 200
  31. opens it in a new tab
  32. No
  33. 2
  34. to describe the image
  35. an attribute
  36. <h1>
  37. An old fort
  38. an opening tag
  39. line 3
  40. a paragraph

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