← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 210 · 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: <p> has a closing tag. (a) True (b) False
  2. 2.🔠 Are headings shown in bold by default? (a) No (b) Yes
  3. 3.True or false: <ul> goes inside ul or ol. (a) False (b) True
  4. 4.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h3>My best friend</h3>
    line 2: <em>Cricket is fun.
    line 3: <b>Rain today</b>
    (a) line 1 (b) line 2 (c) line 3
  6. 6.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
  7. 7.True or false: a code editor opens web pages for us. (a) True (b) False
  8. 8.Which of these is a closing tag? (a) <body> (b) <h1> (c) </p> (d) <li>
  9. 9.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  10. 10.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My best friend (b) Rain today (c) I love mangoes.
  11. 11.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <b>Fun facts
    line 2: <h1>The red kite</h1>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 1 (b) line 3 (c) line 2
  13. 13.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  14. 14.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) has an address bar (d) saves our .html files
  15. 15.🔗 Where does this link open?
    <a href="about.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  16. 16.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) contact.html (b) about.html (c) games.html (d) Maths fun
  17. 17.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
  18. 18.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
  19. 19.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  20. 20.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  21. 21.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing</p>
  23. 23.True or false: a code editor sends pages over the net. (a) False (b) True
  24. 24.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
  25. 25.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  26. 26.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h2>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
  27. 27.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) All about me (b) Cricket Club (c) Mars is red. (d) body
  28. 28.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
  29. 29.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) about.html (c) Play games (d) href
  30. 30.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  31. 31.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  32. 32.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <small>Our school trip
    line 3: <i>Rain today</i>
    (a) line 2 (b) line 1 (c) line 3
  34. 34.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
  35. 35.🔍 One closing tag is missing. Which one?
    <h3>Rain today</h3>
    <u>Our school trip</u>
    <strong>Hello, world!
    (a) </u> (b) </h3> (c) </h1> (d) </strong>
  36. 36.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
  37. 37.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <em>Cricket is fun.</em>
    line 2: <strong>Rain today</strong>
    line 3: <u>I love mangoes.
    (a) line 2 (b) line 1 (c) line 3
  39. 39.True or false: HTML on its own can make links to pages. (a) False (b) True
  40. 40.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>

Answer key

  1. True
  2. Yes
  3. False
  4. a code editor
  5. line 2
  6. 3
  7. False
  8. </p>
  9. a web server
  10. I love mangoes.
  11. to leave notes
  12. line 1
  13. numbers
  14. saves our .html files
  15. in a new tab
  16. games.html
  17. text with links
  18. HyperText
  19. on the browser tab
  20. <ol>
  21. <h1>
  22. 2
  23. False
  24. a plain text editor
  25. has a closing tag
  26. <h2>
  27. All about me
  28. height
  29. Play games
  30. alt
  31. <h2>
  32. <h4>
  33. line 2
  34. </body>
  35. </strong>
  36. <!DOCTYPE html>
  37. No
  38. line 3
  39. True
  40. -->

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