← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 383 · 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 line is missing its closing tag?
    line 1: <small>Cricket is fun.
    line 2: <h1>Fun facts</h1>
    line 3: <p>Hello, world!</p>
    (a) line 3 (b) line 1 (c) line 2
  2. 2.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  3. 3.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
  4. 4.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) kite.png (b) fort.jpg (c) An old fort (d) tiger.jpg
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep
  6. 6.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  7. 7.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    (a) The red kite (b) My pets (c) I love mangoes.
  8. 8.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
  9. 9.Which of these is a closing tag? (a) </li> (b) <li> (c) <body> (d) <h1>
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.</h1>
    line 2: <strong>Our school trip</strong>
    line 3: <u>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  11. 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  12. 12.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  13. 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) has an address bar (d) stores a website’s files
  15. 15.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) Contact us (c) art.html (d) news.html
  16. 16.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) shows line numbers (d) stores a website’s files
  17. 17.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
  18. 18.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  19. 19.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  20. 20.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) Contact us (b) href (c) About us (d) art.html
  21. 21.Which of these is true of a web browser? (a) shows pages from the web (b) answers page requests (c) hosts websites online (d) colours code to help us
  22. 22.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
  23. 23.🔗 Which address opens when you click this link?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) quiz.html (d) art.html
  24. 24.Which of these is true of a web server? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) shows line numbers
  25. 25.True or false: a web browser is where we type code. (a) False (b) True
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue</p>
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  29. 29.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="200">
  31. 31.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  32. 32.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  33. 33.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  34. 34.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) </body>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <p>Hello, world!</p>
    line 2: <h1>My pets
    line 3: <h3>My best friend</h3>
    (a) line 3 (b) line 2 (c) line 1
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>My best friend</p>
    (a) Good morning! (b) My best friend (c) Hello, world! (d) Cricket is fun.
  37. 37.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) Play games (b) href (c) about.html (d) About us
  38. 38.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) Play games (b) About us (c) href (d) maths.html
  39. 39.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
  40. 40.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Maths fun (c) Visit the site (d) href

Answer key

  1. line 1
  2. <ul>
  3. <
  4. fort.jpg
  5. A tiger asleep
  6. <ol>
  7. My pets
  8. -->
  9. </li>
  10. line 3
  11. <a href="about.html">
  12. <!--
  13. has a closing tag
  14. stores a website’s files
  15. maths.html
  16. shows line numbers
  17. <h6>
  18. in a new tab
  19. Yes
  20. About us
  21. shows pages from the web
  22. 3
  23. art.html
  24. stores a website’s files
  25. False
  26. <h5>
  27. 2
  28. 2
  29. opens it in a new tab
  30. 200
  31. No
  32. <a>
  33. <ul>
  34. <!DOCTYPE html>
  35. line 2
  36. Hello, world!
  37. Play games
  38. Play games
  39. <h6>
  40. Visit the site

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