← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 192 · 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 text will NOT show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) Good morning! (c) The red kite (d) Fun facts
  2. 2.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  3. 3.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) wires (d) tags
  4. 4.True or false: a web browser hosts websites online. (a) True (b) False
  5. 5.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  8. 8.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) games.html (c) about.html (d) School news
  9. 9.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My best friend</h3>
    <p>The red kite</p>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Sky is blue</p>
  11. 11.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
  12. 12.True or false: <ol> is an ordered list. (a) True (b) False
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  14. 14.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
  15. 15.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  16. 16.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  17. 17.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
  18. 18.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>Rain today</h2>
    <h2>Our school trip</h2>
  19. 19.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
  20. 20.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
  21. 21.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  22. 22.Which of these goes in the head? (a) <ul> (b) <a> (c) <link rel="stylesheet"> (d) <p>
  23. 23.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) High Tech (d) Home Text
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Sky is blue</p>
  26. 26.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Good morning!</h3>
    <h4>My best friend</h4>
    <h4>Hello, world!</h4>
  27. 27.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  28. 28.True or false: <ol> is an unordered list. (a) True (b) False
  29. 29.True or false: a web browser is where we type code. (a) True (b) False
  30. 30.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  31. 31.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
  32. 32.True or false: <img> has a closing tag. (a) True (b) False
  33. 33.True or false: a code editor answers page requests. (a) False (b) True
  34. 34.True or false: in <img>, width shows if the image fails. (a) False (b) True
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Try this poha. (c) index.html (d) Art Gallery
  36. 36.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Hello, world! (c) My best friend
  37. 37.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  38. 38.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) href (b) games.html (c) Take the quiz (d) Play games
  39. 39.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) Play games (b) art.html (c) maths.html (d) https://example.com
  40. 40.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server

Answer key

  1. Hello, world!
  2. in the same tab
  3. tags
  4. False
  5. has a closing tag
  6. in the body
  7. <ul>
  8. quiz.html
  9. 2
  10. 3
  11. 3
  12. True
  13. <h1>
  14. 1
  15. <a>
  16. href
  17. </html>
  18. 4
  19. <h2>
  20. </h2>
  21. to leave notes
  22. <link rel="stylesheet">
  23. in the body
  24. HyperText
  25. 3
  26. 4
  27. a code editor
  28. False
  29. False
  30. True
  31. 1
  32. False
  33. False
  34. False
  35. Art Gallery
  36. Hello, world!
  37. Yes
  38. Take the quiz
  39. https://example.com
  40. a web browser

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