← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 535 · 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: <a> goes in the head. (a) False (b) True
  2. 2.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h2>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  3. 3.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  4. 4.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Hello, world!</h4>
    <h2>Hello, world!</h2>
    <h2>Fun facts</h2>
  5. 5.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) speed (d) structure
  6. 6.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  7. 7.True or false: HTML on its own can run a game loop. (a) False (b) True
  8. 8.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  9. 9.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
  10. 10.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) </body> (c) </html> (d) <!DOCTYPE html>
  11. 11.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <p>Rain today</p>
  12. 12.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) turns HTML into a page (d) sends pages over the net
  13. 13.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <table> (d) <meta charset="utf-8">
  14. 14.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  15. 15.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>I love mangoes.</h4>
    <h4>Hello, world!</h4>
    <p>Hello, world!</p>
  16. 16.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
  17. 17.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) My Hobbies (d) Match report
  19. 19.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) has an address bar (d) stores a website’s files
  20. 20.📄 Can HTML on its own make headings? (a) Yes (b) No
  21. 21.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) src (d) width
  22. 22.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  24. 24.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  27. 27.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  28. 28.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  29. 29.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  30. 30.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  31. 31.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
  32. 32.🔠 Are headings shown in bold by default? (a) Yes (b) No
  33. 33.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  34. 34.True or false: <ol> is an ordered list. (a) False (b) True
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  36. 36.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    (a) My best friend (b) Good morning! (c) The red kite (d) Cricket is fun.
  37. 37.📄 Can HTML on its own make tables? (a) Yes (b) No
  38. 38.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  39. 39.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
  40. 40.True or false: a web server shows pages from the web. (a) True (b) False

Answer key

  1. False
  2. <h2>
  3. <!DOCTYPE html>
  4. 4
  5. structure
  6. <h1>
  7. False
  8. <h1>
  9. an attribute
  10. <!DOCTYPE html>
  11. 2
  12. sends pages over the net
  13. <table>
  14. to describe the image
  15. 3
  16. 1
  17. a closing tag
  18. My Hobbies
  19. has an address bar
  20. Yes
  21. alt
  22. an opening tag
  23. <
  24. <li>
  25. Yes
  26. False
  27. True
  28. in the same tab
  29. No
  30. in a new tab
  31. 2
  32. Yes
  33. <h2>
  34. True
  35. 50
  36. Cricket is fun.
  37. Yes
  38. href
  39. 2
  40. False

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