← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 952 · 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.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  3. 3.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) games.html (b) quiz.html (c) Take the quiz (d) news.html
  4. 4.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  5. 5.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) news.html (b) Art corner (c) art.html (d) quiz.html
  6. 6.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
  7. 7.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) saves our .html files (d) shows line numbers
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) Our school bus (b) bus.jpg (c) width (d) An old fort
  9. 9.True or false: <ul> shows bullet points. (a) False (b) True
  10. 10.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
  11. 11.Which of these is an empty tag? (a) <title> (b) <p> (c) <input> (d) <h1>
  12. 12.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
  13. 13.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Thanks for visiting. (c) All about me (d) Class 7 Blog
  15. 15.🔗 Where does this link open?
    <a href="about.html">Play games</a>
    (a) in a new tab (b) in the same tab
  16. 16.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
  18. 18.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  19. 19.📄 Can HTML on its own make a form? (a) Yes (b) No
  20. 20.True or false: a web browser sends pages over the net. (a) False (b) True
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  22. 22.🔠 Are headings shown in bold by default? (a) No (b) Yes
  23. 23.True or false: <br> is an empty tag. (a) True (b) False
  24. 24.💬 Does the browser show comments on the page? (a) No (b) Yes
  25. 25.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  27. 27.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  28. 28.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Language (d) Laptop
  29. 29.True or false: <ol> lists steps in order. (a) True (b) False
  30. 30.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  31. 31.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) Contact us (c) href (d) About us
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  33. 33.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Fun facts</h3>
    <p>Rain today</p>
  34. 34.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  35. 35.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  36. 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
  37. 37.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) Hello, world! (b) My best friend (c) Rain today
  38. 38.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
  39. 39.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) maths.html (c) art.html (d) https://example.com

Answer key

  1. in the body
  2. opens it in a new tab
  3. news.html
  4. Yes
  5. art.html
  6. to describe the image
  7. hosts websites online
  8. Our school bus
  9. True
  10. 1
  11. <input>
  12. 3
  13. 2
  14. Class 7 Blog
  15. in the same tab
  16. Yes
  17. 1
  18. <h6>
  19. Yes
  20. False
  21. 150
  22. Yes
  23. True
  24. No
  25. Yes
  26. 2
  27. has a closing tag
  28. Language
  29. True
  30. <h2>
  31. About us
  32. 350
  33. 2
  34. an empty tag
  35. <ul>
  36. a slash /
  37. My best friend
  38. alt
  39. src
  40. https://example.com

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