← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 667 · 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 one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  3. 3.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  4. 4.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  5. 5.True or false: <style> goes in the body. (a) True (b) False
  6. 6.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  7. 7.🔢 In a basic web page file, which comes first: “<html>” or “</html>”? (a) </html> (b) <html>
  8. 8.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Hello, world! (b) My best friend (c) I love mangoes. (d) Cricket is fun.
  9. 9.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
  11. 11.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  12. 12.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
  13. 13.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <h3>My pets</h3>
    <h2>I love mangoes.</h2>
    <h2>The red kite</h2>
  14. 14.True or false: a web server has an address bar. (a) False (b) True
  15. 15.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  17. 17.True or false: <p> is an empty tag. (a) False (b) True
  18. 18.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  19. 19.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
  20. 20.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
  22. 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.📋 What number does the browser show next to “Orange”?
    <ol start="9">
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  24. 24.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) is where we type code
  25. 25.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Good morning!</p>
  26. 26.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) A red kite (b) kite.png (c) map.png (d) cake.jpg
  28. 28.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) About us (b) href (c) games.html (d) Play games
  29. 29.📋 What number does the browser show next to “Guava”?
    <ol start="6">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  30. 30.Which of these is a closing tag? (a) <b> (b) </h1> (c) <li> (d) <h1>
  31. 31.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  32. 32.True or false: <h1> goes in the body. (a) True (b) False
  33. 33.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .png (d) .mp3
  35. 35.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
  36. 36.True or false: <ul> is an ordered list. (a) True (b) False
  37. 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows pages from the web
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep
  40. 40.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>

Answer key

  1. a code editor
  2. Yes
  3. <!--
  4. a web browser
  5. False
  6. No
  7. <html>
  8. I love mangoes.
  9. in the head
  10. a paragraph
  11. 1
  12. <h5>
  13. 4
  14. False
  15. an opening tag
  16. True
  17. False
  18. 1
  19. <h6>
  20. <img>
  21. 2
  22. an empty tag
  23. 11
  24. stores a website’s files
  25. 3
  26. has a closing tag
  27. kite.png
  28. Play games
  29. 8
  30. </h1>
  31. <h5>
  32. True
  33. in the body
  34. .html
  35. 4
  36. False
  37. in the head
  38. sends pages over the net
  39. An old fort
  40. <ul>

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