← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 312 · 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.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  2. 2.Which of these has a closing tag? (a) <img> (b) <input> (c) <br> (d) <p>
  3. 3.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <em>The red kite
    line 2: <strong>Good morning!</strong>
    line 3: <h1>Rain today</h1>
    (a) line 2 (b) line 3 (c) line 1
  5. 5.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) About us (b) Play games (c) maths.html (d) href
  6. 6.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  7. 7.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Maths fun (b) href (c) news.html (d) Art corner
  8. 8.🔠 Are headings shown in bold by default? (a) Yes (b) No
  9. 9.True or false: <li> goes inside ul or ol. (a) False (b) True
  10. 10.True or false: <style> goes in the head. (a) False (b) True
  11. 11.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
  12. 12.True or false: in <img>, width sets how wide it is. (a) False (b) True
  13. 13.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h4> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  15. 15.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  16. 16.Which of these has a closing tag? (a) <img> (b) <ul> (c) <meta> (d) <hr>
  17. 17.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
  18. 18.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  19. 19.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) games.html (b) Take the quiz (c) quiz.html (d) news.html
  20. 20.Which of these is true of a web server? (a) shows line numbers (b) stores a website’s files (c) turns HTML into a page (d) opens web pages for us
  21. 21.🌍 Which program shows a web page to us? (a) a web browser (b) a paint program (c) a music player (d) a calculator
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Class 7 Blog (d) My drawings
  23. 23.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) My drawings (d) Mars is red.
  25. 25.True or false: in <img>, src shows if the image fails. (a) False (b) True
  26. 26.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
  27. 27.True or false: in <img>, src sets how tall it is. (a) True (b) False
  28. 28.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
  30. 30.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) art.html (b) School news (c) href (d) Art corner
  31. 31.True or false: <img> has a closing tag. (a) False (b) True
  32. 32.Which of these is an opening tag? (a) </body> (b) <body> (c) </p> (d) </li>
  33. 33.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  35. 35.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
  36. 36.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  37. 37.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  38. 38.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  40. 40.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) games.html (c) Take the quiz (d) School news

Answer key

  1. 6
  2. <p>
  3. numbers
  4. line 1
  5. Play games
  6. <li>
  7. Maths fun
  8. Yes
  9. True
  10. True
  11. HyperText
  12. True
  13. a closing tag
  14. <h5>
  15. <ul>
  16. <ul>
  17. <h6>
  18. <a>
  19. news.html
  20. stores a website’s files
  21. a web browser
  22. Class 7 Blog
  23. a web browser
  24. My drawings
  25. False
  26. an attribute
  27. False
  28. an opening tag
  29. 4
  30. Art corner
  31. False
  32. <body>
  33. alt
  34. 2
  35. 4
  36. <!--
  37. href
  38. -->
  39. 3
  40. School news

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