← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 349 · 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: HTML on its own can pick a random number. (a) False (b) True
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <i>I love mangoes.
    line 2: <h1>My best friend</h1>
    line 3: <u>Our school trip</u>
    (a) line 1 (b) line 2 (c) line 3
  3. 3.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  4. 4.True or false: <li> lists things in any order. (a) False (b) True
  5. 5.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
  6. 6.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg
  8. 8.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  9. 9.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  10. 10.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) href (c) Art corner (d) games.html
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
  12. 12.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  13. 13.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) answers page requests (d) shows pages from the web
  14. 14.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) Take the quiz (b) href (c) Play games (d) games.html
  15. 15.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  16. 16.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  17. 17.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue</p>
  20. 20.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) Birthday cake (b) width (c) map.png (d) Map of India
  22. 22.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) cake.jpg (b) A red kite (c) kite.png (d) map.png
  23. 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🔗 Where does this link open?
    <a href="about.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  25. 25.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) A happy dog (b) width (c) dog.jpg (d) The full moon
  28. 28.💬 Does the browser show comments on the page? (a) No (b) Yes
  29. 29.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  30. 30.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  31. 31.Which of these is a closing tag? (a) <h1> (b) <b> (c) <body> (d) </li>
  32. 32.Which of these is an empty tag? (a) <h1> (b) <p> (c) <title> (d) <hr>
  33. 33.Which of these is true of a code editor? (a) sends pages over the net (b) stores a website’s files (c) has an address bar (d) saves our .html files
  34. 34.True or false: in <img>, alt describes the picture. (a) False (b) True
  35. 35.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
    (a) Rain today (b) My best friend (c) The red kite (d) Hello, world!
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) Map of India (c) width (d) A red kite
  37. 37.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
  39. 39.📄 Can HTML on its own make headings? (a) No (b) Yes
  40. 40.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->

Answer key

  1. False
  2. line 1
  3. 6
  4. False
  5. an attribute
  6. a web server
  7. A tiger asleep
  8. src
  9. 2
  10. Art corner
  11. 1
  12. <li>
  13. shows pages from the web
  14. Take the quiz
  15. 3
  16. <a>
  17. an empty tag
  18. <ol>
  19. 2
  20. <a href="about.html">
  21. Map of India
  22. kite.png
  23. an opening tag
  24. in a new tab
  25. a closing tag
  26. No
  27. A happy dog
  28. No
  29. <h1>
  30. <ul>
  31. </li>
  32. <hr>
  33. saves our .html files
  34. True
  35. Hello, world!
  36. A red kite
  37. a paragraph
  38. 1
  39. Yes
  40. -->

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