← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 246 · 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.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </html> (d) <!DOCTYPE html>
  2. 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
  4. 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) answers page requests (c) sends pages over the net (d) hosts websites online
  5. 5.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
  6. 6.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) Art corner (b) news.html (c) quiz.html (d) games.html
  7. 7.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  8. 8.True or false: in <img>, width tells which image to load. (a) True (b) False
  9. 9.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) A tiger asleep (b) width (c) An old fort (d) fort.jpg
  11. 11.🔠 Are headings shown in bold by default? (a) Yes (b) No
  12. 12.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <b> (d) <input>
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Planets (b) Art Gallery (c) index.html (d) I like to read.
  14. 14.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  15. 15.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  16. 16.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) width (b) An old fort (c) Our school bus (d) bus.jpg
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
  19. 19.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>The red kite</p>
    <h2>Our school trip</h2>
  20. 20.Which of these is true of a code editor? (a) shows pages from the web (b) answers page requests (c) has an address bar (d) saves our .html files
  21. 21.True or false: in <img>, width describes the picture. (a) True (b) False
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    (a) Hello, world! (b) Rain today (c) I love mangoes.
  23. 23.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) answers page requests
  24. 24.🔗 Which words do you click on?
    <a href="maths.html">School news</a>
    (a) href (b) maths.html (c) School news (d) Take the quiz
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  26. 26.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
  28. 28.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  29. 29.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  30. 30.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep
  32. 32.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  33. 33.💬 Does the browser show comments on the page? (a) No (b) Yes
  34. 34.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Kites fly high</p>
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  39. 39.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>

Answer key

  1. <!DOCTYPE html>
  2. href
  3. <h1>
  4. turns HTML into a page
  5. <h2>
  6. news.html
  7. numbers
  8. False
  9. 3
  10. An old fort
  11. Yes
  12. <input>
  13. Art Gallery
  14. a closing tag
  15. in the same tab
  16. <ul>
  17. Our school bus
  18. <h1>
  19. 2
  20. saves our .html files
  21. False
  22. Rain today
  23. opens web pages for us
  24. School news
  25. 2
  26. an opening tag
  27. element
  28. a web server
  29. True
  30. <!DOCTYPE html>
  31. A tiger asleep
  32. <!--
  33. No
  34. to leave notes
  35. 3
  36. 1
  37. A tiger asleep
  38. 50
  39. <ol>
  40. 2

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