← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 278 · 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 code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  2. 2.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  3. 3.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  4. 4.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  5. 5.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
  6. 6.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  8. 8.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h4> (d) <h5>
  9. 9.Which of these is true of a web browser? (a) turns HTML into a page (b) hosts websites online (c) answers page requests (d) colours code to help us
  10. 10.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) games.html (b) about.html (c) Play games (d) quiz.html
  11. 11.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <head> (d) <html>
  13. 13.True or false: HTML on its own cannot make a form. (a) True (b) False
  14. 14.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  15. 15.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  16. 16.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep
  17. 17.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) speed (d) structure
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) All about me (b) body (c) Try this poha. (d) Class 7 Blog
  19. 19.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
  20. 20.True or false: in <img>, width shows if the image fails. (a) False (b) True
  21. 21.True or false: HTML on its own can make tables. (a) False (b) True
  22. 22.💬 Does the browser show comments on the page? (a) No (b) Yes
  23. 23.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  24. 24.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  25. 25.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) maths.html (b) Contact us (c) About us (d) href
  26. 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  27. 27.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  28. 28.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  29. 29.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
  30. 30.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>I love mangoes.</h3>
    <p>I love mangoes.</p>
    <h4>My pets</h4>
  31. 31.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
  32. 32.Which of these is an empty tag? (a) <meta> (b) <b> (c) <p> (d) <h1>
  33. 33.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  34. 34.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  35. 35.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  36. 36.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Fun facts</p>
    <h4>Rain today</h4>
    <p>Hello, world!</p>
  37. 37.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
  38. 38.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) art.html (b) maths.html (c) Play games (d) https://example.com
  39. 39.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a slash / (d) a dot .

Answer key

  1. <a href="about.html">
  2. to leave notes
  3. <
  4. <h6>
  5. <h1>
  6. an opening tag
  7. in a new tab
  8. <h6>
  9. turns HTML into a page
  10. quiz.html
  11. 6
  12. <!DOCTYPE html>
  13. False
  14. False
  15. a code editor
  16. tiger.jpg
  17. structure
  18. All about me
  19. 3
  20. False
  21. True
  22. No
  23. to describe the image
  24. 3
  25. About us
  26. No
  27. No
  28. a web server
  29. </em>
  30. 3
  31. <li>
  32. <meta>
  33. <!DOCTYPE html>
  34. False
  35. True
  36. 2
  37. 3
  38. https://example.com
  39. a closing tag
  40. a slash /

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