← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 158 · 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.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  2. 2.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Rain today</p>
    <p>Good morning!</p>
  3. 3.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  4. 4.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) height (d) width
  5. 5.🔗 Where does this link open?
    <a href="art.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  6. 6.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  7. 7.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
  8. 8.📄 Can HTML on its own make headings? (a) No (b) Yes
  9. 9.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  10. 10.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png
  12. 12.True or false: <li> is an empty tag. (a) False (b) True
  13. 13.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  14. 14.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  15. 15.Which of these is true of a web browser? (a) stores a website’s files (b) sends pages over the net (c) shows line numbers (d) opens web pages for us
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) Fun facts (b) My best friend (c) Good morning!
  17. 17.Which of these is true of a web browser? (a) has an address bar (b) saves our .html files (c) answers page requests (d) hosts websites online
  18. 18.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) </html> (d) <head>
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Planets (c) Space Facts (d) index.html
  21. 21.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.True or false: <style> goes in the head. (a) False (b) True
  23. 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
  24. 24.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
  26. 26.Which of these is true of a code editor? (a) turns HTML into a page (b) answers page requests (c) stores a website’s files (d) is where we type code
  27. 27.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite
  29. 29.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
  30. 30.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) Easy snacks (d) I like to read.
  31. 31.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  32. 32.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) shows pages from the web (d) turns HTML into a page
  33. 33.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  34. 34.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) art.html (c) news.html (d) Play games
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) My drawings (c) index.html (d) Art Gallery
  36. 36.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  38. 38.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Fun facts</p> -->
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
  40. 40.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. -->
  2. 5
  3. starts a new line
  4. alt
  5. in a new tab
  6. <ul>
  7. 4
  8. Yes
  9. <a href="about.html">
  10. in the body
  11. moon.png
  12. False
  13. <ul>
  14. <a>
  15. opens web pages for us
  16. Good morning!
  17. has an address bar
  18. </html>
  19. 2
  20. Space Facts
  21. in the head
  22. True
  23. Yes
  24. href
  25. 1
  26. is where we type code
  27. <ul>
  28. A tiger asleep
  29. </em>
  30. Class 7 Blog
  31. a code editor
  32. saves our .html files
  33. <h6>
  34. maths.html
  35. Art Gallery
  36. an opening tag
  37. No
  38. 1
  39. 1
  40. an opening tag

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