← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 102 · 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.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Orange</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  2. 2.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  3. 3.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  4. 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
  5. 5.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) src (d) alt
  6. 6.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
  7. 7.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  9. 9.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  10. 10.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  11. 11.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h2>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  13. 13.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  14. 14.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <h2>My best friend</h2>
  16. 16.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <b>Rain today
    line 2: <h1>Hello, world!</h1>
    line 3: <small>Cricket is fun.</small>
    (a) line 3 (b) line 2 (c) line 1
  18. 18.True or false: <title> has a closing tag. (a) False (b) True
  19. 19.Which of these is an opening tag? (a) </title> (b) <h1> (c) </body> (d) </p>
  20. 20.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) colours code to help us (d) sends pages over the net
  21. 21.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  22. 22.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  23. 23.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow<br>Sky is blue</p>
  25. 25.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  26. 26.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  27. 27.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png
  28. 28.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  30. 30.🔠 Are headings shown in bold by default? (a) No (b) Yes
  31. 31.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Visit the site (b) about.html (c) Contact us (d) href
  32. 32.Which of these is true of a web server? (a) has an address bar (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
  33. 33.True or false: <ul> goes in the body. (a) True (b) False
  34. 34.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Cricket Club (c) Try this poha. (d) All about me
  35. 35.True or false: in <img>, width names the picture file. (a) True (b) False
  36. 36.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) turns HTML into a page (d) shows pages from the web
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Cricket Club (c) I like to read. (d) Easy snacks
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) I love mangoes. (b) Cricket is fun. (c) My pets (d) Good morning!

Answer key

  1. 6
  2. starts a new line
  3. <a>
  4. True
  5. src
  6. a code editor
  7. 1
  8. 2
  9. <ol>
  10. True
  11. a closing tag
  12. <h5>
  13. 3
  14. an opening tag
  15. 2
  16. 4
  17. line 1
  18. True
  19. <h1>
  20. opens web pages for us
  21. a slash /
  22. <li>
  23. True
  24. 4
  25. False
  26. <h1>
  27. tiger.jpg
  28. <h3>
  29. Yes
  30. Yes
  31. Contact us
  32. stores a website’s files
  33. True
  34. All about me
  35. False
  36. in the body
  37. an opening tag
  38. shows line numbers
  39. Cricket Club
  40. My pets

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