← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 968 · 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 of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <a> (d) <link rel="stylesheet">
  2. 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  3. 3.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  4. 4.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  5. 5.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  7. 7.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    (a) The red kite (b) Our school trip (c) Rain today
  8. 8.Which of these is true of a code editor? (a) saves our .html files (b) answers page requests (c) opens web pages for us (d) shows pages from the web
  9. 9.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </head> (c) </html> (d) <head>
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg
  11. 11.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Good morning!</h4>
    <h4>Our school trip</h4>
    <h2>The red kite</h2>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!</h3>
    line 2: <h1>Our school trip
    line 3: <i>My best friend</i>
    (a) line 2 (b) line 3 (c) line 1
  13. 13.True or false: <img> is an empty tag. (a) False (b) True
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  15. 15.True or false: <ul> goes in the body. (a) True (b) False
  16. 16.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) hosts websites online (d) answers page requests
  17. 17.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
  18. 18.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  20. 20.Which of these is true of a web server? (a) sends pages over the net (b) turns HTML into a page (c) shows line numbers (d) is where we type code
  21. 21.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  22. 22.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
  23. 23.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Cricket is fun.</p> -->
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Art Gallery (b) Mars is red. (c) index.html (d) Welcome!
  25. 25.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  26. 26.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
  27. 27.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  28. 28.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.Which of these is true of a web browser? (a) saves our .html files (b) has an address bar (c) answers page requests (d) hosts websites online
  30. 30.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) bus.jpg (b) width (c) Our school bus (d) An old fort
  32. 32.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg
  33. 33.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) opens web pages for us (d) sends pages over the net
  34. 34.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in the same tab (b) in a new tab
  35. 35.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) quiz.html (d) games.html
  36. 36.🔍 Which is the odd one out? (a) answers page requests (b) turns HTML into a page (c) sends pages over the net (d) stores a website’s files
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>My pets</p>
  38. 38.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India
  39. 39.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) hosts websites online (d) shows pages from the web
  40. 40.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) Play games (c) href (d) about.html

Answer key

  1. <a>
  2. opens it in a new tab
  3. False
  4. a slash /
  5. in the head
  6. <h6>
  7. Our school trip
  8. saves our .html files
  9. </html>
  10. Birthday cake
  11. 4
  12. line 2
  13. True
  14. 100
  15. True
  16. saves our .html files
  17. height
  18. an empty tag
  19. a line across the page
  20. sends pages over the net
  21. a web browser
  22. <h2>
  23. 1
  24. Art Gallery
  25. <a>
  26. <a href="about.html">
  27. src
  28. a closing tag
  29. has an address bar
  30. <h3>
  31. Our school bus
  32. map.png
  33. opens web pages for us
  34. in the same tab
  35. news.html
  36. turns HTML into a page
  37. 3
  38. map.png
  39. shows pages from the web
  40. Play games

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