← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 404 · 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 paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
  2. 2.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) <!DOCTYPE html> (b) </body>
  3. 3.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My best friend</p>
    <h2>My pets</h2>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  4. 4.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  5. 5.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  6. 6.True or false: <li> is an empty tag. (a) True (b) False
  7. 7.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  9. 9.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  10. 10.True or false: HTML on its own can make headings. (a) True (b) False
  11. 11.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) an element name (d) a closing tag
  12. 12.Which of these is an empty tag? (a) <br> (b) <b> (c) <li> (d) <title>
  13. 13.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  15. 15.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Match report (c) Space Facts (d) body
  17. 17.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
  18. 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  19. 19.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) quiz.html (b) art.html (c) news.html (d) Play games
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h2>My pets</h2>
    line 2: <p>Our school trip
    line 3: <b>Cricket is fun.</b>
    (a) line 3 (b) line 2 (c) line 1
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend</strong>
    line 2: <h2>Our school trip
    line 3: <h3>Fun facts</h3>
    (a) line 1 (b) line 3 (c) line 2
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) width (b) cake.jpg (c) A happy dog (d) Birthday cake
  24. 24.True or false: <hr> has a closing tag. (a) True (b) False
  25. 25.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
  26. 26.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  27. 27.📄 Can HTML on its own make a form? (a) No (b) Yes
  28. 28.True or false: <title> goes in the head. (a) False (b) True
  29. 29.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  30. 30.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>My pets</h2>
    <h4>Cricket is fun.</h4>
    <h4>The red kite</h4>
  32. 32.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  33. 33.Which of these has a closing tag? (a) <hr> (b) <input> (c) <b> (d) <img>
  34. 34.🔍 One closing tag is missing. Which one?
    <i>Rain today</i>
    <u>My pets
    <b>Cricket is fun.</b>
    (a) </h3> (b) </u> (c) </b> (d) </i>
  35. 35.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Rain today</p>
    <p>Rain today</p>
  36. 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <p>The red kite
    line 3: <h3>My pets</h3>
    (a) line 2 (b) line 1 (c) line 3
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  39. 39.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  40. 40.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) href (b) quiz.html (c) Take the quiz (d) School news

Answer key

  1. 1
  2. <!DOCTYPE html>
  3. 4
  4. a web server
  5. <ol>
  6. False
  7. a closing tag
  8. 6
  9. <h6>
  10. True
  11. an attribute
  12. <br>
  13. a closing tag
  14. a web server
  15. <h1>
  16. Match report
  17. tags
  18. a slash /
  19. art.html
  20. line 2
  21. 6
  22. line 2
  23. Birthday cake
  24. False
  25. 4
  26. a web browser
  27. Yes
  28. True
  29. <ul>
  30. in the head
  31. 4
  32. a code editor
  33. <b>
  34. </u>
  35. 1
  36. <!DOCTYPE html>
  37. line 2
  38. numbers
  39. opens it in a new tab
  40. School news

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