← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 269 · 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.True or false: in <img>, width sets how wide it is. (a) False (b) True
  2. 2.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  3. 3.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  4. 4.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Fun facts</h3>
    <p>My pets</p>
  5. 5.True or false: <img> goes in the head. (a) True (b) False
  6. 6.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  7. 7.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    (a) My best friend (b) Our school trip (c) I love mangoes. (d) Good morning!
  9. 9.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <link rel="stylesheet">
  10. 10.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) About us (b) art.html (c) Contact us (d) href
  11. 11.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
    <p>Good morning!</p>
  12. 12.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  13. 13.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Rivers flow<br>Kites fly high</p>
  15. 15.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
  16. 16.🔗 Where does this link open?
    <a href="games.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  17. 17.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) answers page requests (d) opens web pages for us
  18. 18.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) Take the quiz (c) https://example.com (d) maths.html
  19. 19.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
  20. 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  21. 21.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today</i>
    line 2: <h2>My pets
    line 3: <u>Our school trip</u>
    (a) line 2 (b) line 1 (c) line 3
  23. 23.True or false: a web server is where we type code. (a) True (b) False
  24. 24.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>The red kite</p>
    (a) Good morning! (b) My pets (c) The red kite (d) Cricket is fun.
  25. 25.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  26. 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) stores a website’s files (d) opens web pages for us
  27. 27.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
  28. 28.True or false: in <img>, src is read by screen readers. (a) True (b) False
  29. 29.Which of these is true of a code editor? (a) turns HTML into a page (b) saves our .html files (c) hosts websites online (d) shows pages from the web
  30. 30.Which of these has a closing tag? (a) <hr> (b) <br> (c) <input> (d) <ul>
  31. 31.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) href (b) art.html (c) School news (d) Take the quiz
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    (a) Our school trip (b) Cricket is fun. (c) The red kite (d) I love mangoes.
  33. 33.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
  34. 34.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  35. 35.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  36. 36.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h4>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  37. 37.Which of these is true of a web server? (a) opens web pages for us (b) shows line numbers (c) stores a website’s files (d) is where we type code
  38. 38.True or false: <table> goes in the body. (a) False (b) True
  39. 39.True or false: <ol> goes inside ul or ol. (a) False (b) True
  40. 40.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. True
  2. in the body
  3. numbers
  4. 2
  5. False
  6. <ul>
  7. a closing tag
  8. I love mangoes.
  9. <link rel="stylesheet">
  10. About us
  11. 3
  12. Yes
  13. text with links
  14. 4
  15. <li>
  16. in a new tab
  17. opens web pages for us
  18. contact.html
  19. as one space
  20. No
  21. <h1>
  22. line 2
  23. False
  24. Cricket is fun.
  25. a web server
  26. stores a website’s files
  27. the body
  28. False
  29. saves our .html files
  30. <ul>
  31. School news
  32. The red kite
  33. alt
  34. 1
  35. False
  36. <h6>
  37. stores a website’s files
  38. True
  39. False
  40. has a closing tag

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