← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 557 · 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.🔠 Are headings shown in bold by default? (a) No (b) Yes
  2. 2.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  3. 3.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  5. 5.🔗 Where does this link open?
    <a href="news.html">About us</a>
    (a) in the same tab (b) in a new tab
  6. 6.True or false: <li> has a closing tag. (a) False (b) True
  7. 7.True or false: <li> is an empty tag. (a) True (b) False
  8. 8.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  9. 9.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  10. 10.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <head>
  11. 11.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <h3>Hello, world!</h3>
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
  13. 13.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
  14. 14.True or false: in <img>, height sets how tall it is. (a) True (b) False
  15. 15.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <h4>Good morning!</h4>
    <h3>My pets</h3>
  16. 16.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) <u> (d) </u>
  17. 17.Which of these goes in the head? (a) <h1> (b) <ul> (c) <meta charset="utf-8"> (d) <table>
  18. 18.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
  19. 19.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  20. 20.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  21. 21.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  22. 22.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  23. 23.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a web browser (d) a music player
  24. 24.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h4>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
  25. 25.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  26. 26.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) art.html (b) School news (c) news.html (d) quiz.html
  27. 27.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  28. 28.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <h2>Good morning!</h2>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
  29. 29.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  30. 30.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
  31. 31.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  32. 32.True or false: in <img>, width sets how wide it is. (a) False (b) True
  33. 33.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <em>My pets</em>
    line 2: <u>Good morning!</u>
    line 3: <h3>The red kite
    (a) line 1 (b) line 3 (c) line 2
  35. 35.Which of these has a closing tag? (a) <p> (b) <img> (c) <br> (d) <hr>
  36. 36.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) quiz.html (b) games.html (c) Play games (d) news.html
  38. 38.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  39. 39.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  40. 40.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>

Answer key

  1. Yes
  2. 2
  3. opens it in a new tab
  4. 1
  5. in the same tab
  6. True
  7. False
  8. in the same tab
  9. a web browser
  10. <!DOCTYPE html>
  11. 2
  12. 1
  13. src
  14. True
  15. 3
  16. </u>
  17. <meta charset="utf-8">
  18. </b>
  19. the body
  20. a web browser
  21. on the browser tab
  22. <ol>
  23. a web browser
  24. <h1>
  25. in the same tab
  26. art.html
  27. <a>
  28. 4
  29. a code editor
  30. a paragraph
  31. 1
  32. True
  33. -->
  34. line 3
  35. <p>
  36. has a closing tag
  37. news.html
  38. <h1>
  39. </h2>
  40. <h5>

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