← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 257 · 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.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  2. 2.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  3. 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
  4. 4.Which of these is true of a web server? (a) colours code to help us (b) saves our .html files (c) sends pages over the net (d) turns HTML into a page
  5. 5.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  6. 6.True or false: in <img>, src is read by screen readers. (a) False (b) True
  7. 7.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  8. 8.True or false: <ul> is one item of a list. (a) False (b) True
  9. 9.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  10. 10.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  11. 11.🔗 Where does this link open?
    <a href="contact.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  12. 12.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  13. 13.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  14. 14.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </head> (c) </body> (d) <head>
  15. 15.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) width (b) Birthday cake (c) map.png (d) Map of India
  17. 17.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) games.html
  18. 18.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) Take the quiz (c) about.html (d) href
  19. 19.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Visit the site (b) Contact us (c) href (d) about.html
  20. 20.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  21. 21.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  23. 23.True or false: <li> is an unordered list. (a) False (b) True
  24. 24.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
  25. 25.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  26. 26.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  27. 27.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  28. 28.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  29. 29.💬 Does the browser show comments on the page? (a) Yes (b) No
  30. 30.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Our school trip</p>
    <p>Rain today</p>
  31. 31.True or false: in <img>, height describes the picture. (a) False (b) True
  32. 32.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <p>I love mangoes.</p>
  33. 33.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>My pets</p>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
  34. 34.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  36. 36.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  37. 37.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) about.html (b) href (c) School news (d) Take the quiz
  38. 38.True or false: in <img>, width sets how wide it is. (a) False (b) True
  39. 39.True or false: <ul> is an ordered list. (a) True (b) False
  40. 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces

Answer key

  1. an opening tag
  2. Yes
  3. Yes
  4. sends pages over the net
  5. in a new tab
  6. False
  7. Markup
  8. False
  9. <h6>
  10. <a>
  11. in the same tab
  12. No
  13. to leave notes
  14. <!DOCTYPE html>
  15. <ul>
  16. Map of India
  17. Take the quiz
  18. Take the quiz
  19. Contact us
  20. on the browser tab
  21. an attribute
  22. numbers
  23. False
  24. <h1>
  25. a code editor
  26. in the same tab
  27. 6
  28. a web browser
  29. No
  30. 1
  31. False
  32. 4
  33. 4
  34. has a closing tag
  35. <li>
  36. a web server
  37. School news
  38. True
  39. False
  40. as one space

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