← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 966 · 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: <ul> has a closing tag. (a) False (b) True
  2. 2.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
  3. 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>The red kite</p>
  5. 5.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  6. 6.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
  7. 7.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h3>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png
  9. 9.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) hosts websites online (d) stores a website’s files
  10. 10.Which of these is an empty tag? (a) <h1> (b) <input> (c) <li> (d) <b>
  11. 11.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
    (a) Hello, world! (b) I love mangoes. (c) Cricket is fun. (d) The red kite
  12. 12.True or false: in <img>, alt names the picture file. (a) False (b) True
  13. 13.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) href (b) Contact us (c) games.html (d) Visit the site
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  15. 15.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
  17. 17.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  18. 18.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) opens web pages for us (d) is where we type code
  19. 19.📋 What number does the browser show next to “Grapes”?
    <ol start="5">
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite
  21. 21.Which of these is an opening tag? (a) </title> (b) </p> (c) </body> (d) <li>
  22. 22.🔍 Which is the odd one out? (a) sends pages over the net (b) shows line numbers (c) answers page requests (d) hosts websites online
  23. 23.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  24. 24.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>My pets</p>
    <p>The red kite</p>
  25. 25.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) alt (d) height
  26. 26.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  27. 27.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  29. 29.True or false: <li> shows bullet points. (a) True (b) False
  30. 30.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) very big text (d) secret text
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>My pets</p>
    (a) My pets (b) The red kite (c) Hello, world!
  32. 32.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>Hello, world!</h4>
    <p>Our school trip</p>
  34. 34.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  35. 35.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  36. 36.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  37. 37.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) colours code to help us (d) shows line numbers
  38. 38.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) href (d) art.html
  39. 39.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  40. 40.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. True
  2. to leave notes
  3. as one space
  4. 4
  5. No
  6. 4
  7. <h2>
  8. moon.png
  9. saves our .html files
  10. <input>
  11. Cricket is fun.
  12. False
  13. Contact us
  14. 300
  15. an opening tag
  16. 4
  17. 6
  18. is where we type code
  19. 10
  20. A tiger asleep
  21. <li>
  22. shows line numbers
  23. <ol>
  24. 5
  25. height
  26. <ol>
  27. <h1>
  28. 150
  29. False
  30. text with links
  31. Hello, world!
  32. a closing tag
  33. 2
  34. 2
  35. <li>
  36. <ul>
  37. sends pages over the net
  38. Visit the site
  39. <h2>
  40. an opening tag

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