← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 305 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.🎯 What kind of selector is h1? (a) a class selector (b) an element selector (c) an id selector
  2. 2.Which of these does JavaScript do? (a) puts a picture on a page (b) counts down a timer (c) makes headings and lists (d) adds space around boxes
  3. 3.Which of these is an empty tag? (a) <p> (b) <ul> (c) <title> (d) <br>
  4. 4.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser shows it (b) the browser asks it (c) DNS finds the server (d) the server sends files
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <i>Fun facts</i>
    line 3: <h3>Cricket is fun.
    (a) line 3 (b) line 1 (c) line 2
  6. 6.🔗 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">
  7. 7.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      font-size: 20px;
      border: 2px solid;
    }
  8. 8.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <h2>My pets</h2>
  9. 9.🌍 What is the domain name in this URL?
    http://learn.example.com/maths/tables.html
    (a) http (b) /maths/tables.html (c) www.example.com (d) learn.example.com
  10. 10.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
  12. 12.🖌️ Which CSS property makes the text bold? (a) font-weight (b) color (c) text-align (d) font-family
  13. 13.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/news/today.html
    (a) Yes (b) No
  14. 14.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  15. 15.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <p>I love mangoes.</p>
    line 2: <h1>Rain today</h1>
    line 3: <em>Our school trip
    (a) line 1 (b) line 3 (c) line 2
  17. 17.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  18. 18.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
  19. 19.True or false: <main> holds the main content. (a) False (b) True
  20. 20.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <ul> (d) <b>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  22. 22.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
  23. 23.True or false: <th> makes one data cell. (a) True (b) False
  24. 24.♿ Which link text is clearest? (a) link (b) here (c) click here (d) Read the fruit facts
  25. 25.⚡ Which JavaScript word writes in the console? (a) if (b) console.log() (c) let (d) alert()
  26. 26.🧭 How many <main> parts should a page have? (a) none (b) ten (c) one (d) three
  27. 27.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <js> (c) <script> (d) <code>
  28. 28.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) href (b) https://example.com (c) About us (d) Contact us
  29. 29.Which of these is a weak password? (a) Rain#Drop_42! (b) Blue@Tiger_74 (c) 123456 (d) S0lar!Pen#8
  30. 30.🔁 When does the else part run? (a) always (b) when if is true (c) never (d) when if is false
  31. 31.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Mars is red. (c) Welcome! (d) Class 7 Blog
  32. 32.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  33. 33.✍️ What is the selector in this CSS rule?
    body {
      background-color: yellow;
      font-style: italic;
      text-align: center;
      padding: 8px;
    }
    (a) .box (b) body (c) background-color (d) italic
  34. 34.True or false: “tiny grey text” makes the page harder to use. (a) False (b) True
  35. 35.🖌️ How big is the text, in px?
    h1 {
      background-color: orange;
      text-align: right;
      color: red;
      font-size: 40px;
    }
  36. 36.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.Which of these is true of a web server? (a) turns HTML into a page (b) opens web pages for us (c) has an address bar (d) hosts websites online
  38. 38.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
  39. 39.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.💪 Which flexbox property sets space between boxes? (a) display: flex (b) align-items (c) gap (d) justify-content

Answer key

  1. an element selector
  2. counts down a timer
  3. <br>
  4. DNS finds the server
  5. line 3
  6. <a href="about.html">
  7. 2
  8. 2
  9. learn.example.com
  10. <!DOCTYPE html>
  11. <h1>
  12. font-weight
  13. Yes
  14. to leave notes
  15. dog.jpg
  16. line 3
  17. <li>
  18. False
  19. True
  20. <meta>
  21. 3
  22. alt
  23. False
  24. Read the fruit facts
  25. console.log()
  26. one
  27. <script>
  28. About us
  29. 123456
  30. when if is false
  31. Welcome!
  32. opens it in a new tab
  33. body
  34. True
  35. 40
  36. an opening tag
  37. hosts websites online
  38. width
  39. has a closing tag
  40. gap

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