← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 402 · 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.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  2. 2.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  3. 3.🔗 Where does this link open?
    <a href="games.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  4. 4.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) My pets (b) Hello, world! (c) Rain today (d) Cricket is fun.
  5. 5.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  6. 6.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Laptop (d) Line
  7. 7.Which of these is a closing tag? (a) <body> (b) <p> (c) <b> (d) </p>
  8. 8.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  9. 9.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
  10. 10.True or false: HTML on its own cannot pick a random number. (a) True (b) False
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  12. 12.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Our school trip</p> -->
  13. 13.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  14. 14.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
  15. 15.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
  16. 16.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  17. 17.True or false: in <img>, alt describes the picture. (a) True (b) False
  18. 18.🔗 Where does this link open?
    <a href="art.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  19. 19.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  20. 20.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <html> (c) </html> (d) <!DOCTYPE html>
  21. 21.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
  23. 23.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
  24. 24.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  25. 25.Which of these is a closing tag? (a) <h1> (b) </li> (c) <title> (d) <p>
  26. 26.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
  27. 27.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) adds a picture (d) makes a list
  28. 28.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u> (c) <\u> (d) <u/>
  29. 29.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
  30. 30.Which of these is true of a code editor? (a) answers page requests (b) colours code to help us (c) has an address bar (d) stores a website’s files
  31. 31.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) My pets
  32. 32.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Our school trip (c) My pets (d) The red kite
  33. 33.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  34. 34.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  35. 35.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  36. 36.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </h1>
  37. 37.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  38. 38.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
  40. 40.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) href (b) maths.html (c) About us (d) Contact us

Answer key

  1. to leave notes
  2. </small>
  3. in the same tab
  4. Cricket is fun.
  5. <
  6. Language
  7. </p>
  8. a web browser
  9. False
  10. True
  11. 2
  12. 1
  13. <h1>
  14. 4
  15. <h1>
  16. <a>
  17. True
  18. in a new tab
  19. <ul>
  20. </html>
  21. an opening tag
  22. -->
  23. <h1>
  24. <ul>
  25. </li>
  26. 2
  27. starts a new line
  28. </u>
  29. 4
  30. colours code to help us
  31. My pets
  32. My best friend
  33. a web browser
  34. True
  35. <li>
  36. </h1>
  37. Yes
  38. in the head
  39. <!DOCTYPE html>
  40. About us

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