← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 727 · 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.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
  2. 2.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) <!DOCTYPE html> (d) <html>
  3. 3.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) in the head (c) in the footer (d) inside a <p>
  4. 4.⚡ What does this code print? (Look at the quotes!)
    let x = "4";
    let y = 2;
    console.log(x + y);
    (a) Error (b) 42 (c) 6
  5. 5.🎯 Which CSS selector matches this element?
    <span class="menu" id="hero">Hello</span>
    (a) .hero (b) .menu (c) p (d) .note
  6. 6.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 18px;
      }
    }
  7. 7.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) alt (c) height (d) src
  8. 8.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  9. 9.🎯 Which sign starts an id selector? (a) & (b) # (c) . (d) @
  10. 10.🌗 Is blue on purple easy or hard to read? (a) hard to read (b) easy to read
  11. 11.🌍 What is the domain name in this URL?
    https://www.example.net/index.html
    (a) learn.example.com (b) /index.html (c) https (d) www.example.net
  12. 12.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  13. 13.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read
  14. 14.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) alt (d) height
  15. 15.🌈 Which colour is #ff00ff? (a) blue (b) white (c) black (d) magenta
  16. 16.📊 Which tag makes one data cell? (a) <td> (b) <tr> (c) <caption> (d) <th>
  17. 17.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) High Tech (d) Home Text
  18. 18.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 200px;
      padding: 10px;
      border: 4px solid black;
      margin: 15px;
    }
  19. 19.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  20. 20.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  21. 21.🌍 Which one stores the site’s files? (a) the browser (b) the server (c) HTTPS (d) the URL
  22. 22.⚡ What does this code print? (Look at the quotes!)
    let x = "4";
    let y = 9;
    console.log(x + y);
    (a) 13 (b) 49 (c) Error
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
  24. 24.🔢 On a typical page, from top to bottom, what comes right after “<main>”? (a) <nav> (b) <header> (c) <footer>
  25. 25.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) align-items (c) justify-content (d) gap
  26. 26.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) news.html (b) href (c) Visit the site (d) Maths fun
  27. 27.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  28. 28.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
  29. 29.🌍 Which one shows the page to you? (a) the browser (b) HTTPS (c) the server (d) the URL
  30. 30.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
  31. 31.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  32. 32.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  34. 34.True or false: in <img>, width sets how wide it is. (a) False (b) True
  35. 35.Which of these is true of a web server? (a) hosts websites online (b) turns HTML into a page (c) shows line numbers (d) opens web pages for us
  36. 36.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
  38. 38.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) href (b) About us (c) Contact us (d) about.html
  39. 39.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      padding: 8px;
      text-align: center;
    }
  40. 40.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser

Answer key

  1. alt
  2. <!DOCTYPE html>
  3. in the head
  4. 42
  5. .menu
  6. 18
  7. width
  8. a closing tag
  9. #
  10. hard to read
  11. www.example.net
  12. <!DOCTYPE html>
  13. easy to read
  14. src
  15. magenta
  16. <td>
  17. HyperText
  18. 258
  19. True
  20. <h1>
  21. the server
  22. 49
  23. <h1>
  24. <footer>
  25. align-items
  26. Visit the site
  27. <li>
  28. <h6>
  29. the browser
  30. No
  31. red
  32. in the head
  33. Yes
  34. True
  35. hosts websites online
  36. in the body
  37. 66
  38. About us
  39. 2
  40. a web server

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