← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 759 · 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.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  2. 2.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  3. 3.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  4. 4.True or false: in <img>, src describes the picture. (a) True (b) False
  5. 5.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  6. 6.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  7. 7.🔗 What does HyperText mean? (a) secret text (b) text in colour (c) very big text (d) text with links
  8. 8.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) School news (b) games.html (c) news.html (d) quiz.html
  9. 9.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  10. 10.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p> (c) <p/> (d) <\p>
  11. 11.True or false: a code editor shows pages from the web. (a) False (b) True
  12. 12.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Rain today (c) Good morning!
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  14. 14.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) href (b) About us (c) https://example.com (d) Play games
  16. 16.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  17. 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
  19. 19.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) opens web pages for us (d) is where we type code
  20. 20.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  21. 21.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <\h3> (d) <h3/>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="200">
  23. 23.True or false: <ol> lists steps in order. (a) True (b) False
  24. 24.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) shows pages from the web (d) has an address bar
  25. 25.🧱 HTML gives a web page its ___. (a) structure (b) speed (c) colours (d) sound
  26. 26.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) turns HTML into a page (d) sends pages over the net
  27. 27.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Rain today (c) My best friend
  28. 28.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
  29. 29.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) Art Gallery (d) All about me
  30. 30.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  31. 31.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Rain today</h3>
    <p>Fun facts</p>
    <h4>Our school trip</h4>
    <p>The red kite</p>
  32. 32.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
  33. 33.True or false: <style> goes in the body. (a) True (b) False
  34. 34.True or false: in <img>, src names the picture file. (a) False (b) True
  35. 35.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) kite.png (b) fort.jpg (c) An old fort (d) tiger.jpg
  36. 36.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>The red kite</p>
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) bus.jpg (b) Our school bus (c) An old fort (d) width
  38. 38.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) About us (b) quiz.html (c) games.html (d) news.html
  39. 39.Which of these is an opening tag? (a) </li> (b) </title> (c) <li> (d) </b>
  40. 40.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6

Answer key

  1. href
  2. starts a new line
  3. <li>
  4. False
  5. a web server
  6. element
  7. text with links
  8. news.html
  9. Yes
  10. </p>
  11. False
  12. Cricket is fun.
  13. bullets
  14. a closing tag
  15. Play games
  16. 1
  17. as one space
  18. <h5>
  19. opens web pages for us
  20. <
  21. </h3>
  22. 200
  23. True
  24. colours code to help us
  25. structure
  26. sends pages over the net
  27. My best friend
  28. <ol>
  29. Art Gallery
  30. 6
  31. 3
  32. -->
  33. False
  34. True
  35. fort.jpg
  36. 1
  37. Our school bus
  38. news.html
  39. <li>
  40. 1

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