← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 635 · 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 does text-align do? (a) sets the letter colour (b) centres a heading (c) makes letters bigger (d) picks the font style
  2. 2.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) bright green (c) white (d) magenta
  3. 3.⚡ Which JavaScript word runs code when true? (a) alert() (b) if (c) console.log() (d) let
  4. 4.True or false: to post your home address is not safe. (a) False (b) True
  5. 5.🧩 Which language rounds box corners? (a) HTML (b) JavaScript (c) CSS
  6. 6.What does justify-content: flex-start do? (a) packs boxes at the start (b) puts boxes in the middle (c) equal gaps, none at ends (d) packs boxes at the end
  7. 7.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) script.js (c) index.html
  8. 8.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      text-align: center;
    }
  9. 9.True or false: in <img>, src names the picture file. (a) True (b) False
  10. 10.🖌️ What colour is behind the letters?
    p {
      background-color: white;
      font-size: 24px;
      color: yellow;
      text-align: center;
    }
    (a) white (b) orange (c) yellow
  11. 11.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  12. 12.📄 Can HTML on its own make tables? (a) No (b) Yes
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Cricket Club (b) Try this poha. (c) index.html (d) All about me
  14. 14.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
  15. 15.🖌️ How big is the text, in px?
    h2 {
      font-size: 16px;
      background-color: red;
      color: purple;
      text-align: center;
    }
  16. 16.Which of these is not safe to do online? (a) use a strong password (b) share your OTP (c) check for https first (d) use a nickname in games
  17. 17.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
  18. 18.True or false: margin is space inside the border. (a) True (b) False
  19. 19.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
  20. 20.🔢 To build and share your first web page, which comes first: “add CSS styles” or “write the HTML”? (a) add CSS styles (b) write the HTML
  21. 21.🔁 How many times does this code print “Hello”?
    for (let i = 2; i <= 10; i++) {
      console.log("Hello");
    }
  22. 22.⚡ What number does this code print?
    let a = 48;
    let b = 11;
    console.log(a + b);
  23. 23.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Orange
      <input type="checkbox" name="colour"> Green
      <input type="checkbox" name="colour"> Blue
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Pink
    </form>
  24. 24.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  25. 25.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Art Gallery (c) Match report (d) body
  26. 26.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Colourful Site Styles (c) Creative Sheet System (d) Cascading Style Sheets
  27. 27.What is <input type="password"> for? (a) picks a day (b) hides what you type (c) is for an email address (d) lets you tick many
  28. 28.♿ Which link text is clearest? (a) link (b) Read the fruit facts (c) click here (d) here
  29. 29.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
  30. 30.⚖️ What colour is the text of this element?
    <h1 class="menu" id="top">Hi</h1>
    CSS:
    h1 { color: red; }
    h1 { color: green; }
    (a) purple (b) red (c) blue (d) green
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </body> (d) <!DOCTYPE html>
  32. 32.🧭 Why use <nav> instead of <div> for a menu? (a) it adds pictures (b) it makes text red (c) it loads faster (d) it tells its meaning
  33. 33.⚖️ What colour is the text of this element?
    <p class="red" id="logo">Hi</p>
    CSS:
    .red { color: red; }
    p { color: purple; }
    (a) red (b) black (c) white (d) purple
  34. 34.True or false: “skipping heading levels” helps everyone use the page. (a) True (b) False
  35. 35.🔁 What does i++ do? (a) adds 1 to i (b) doubles i (c) takes 1 from i (d) prints i
  36. 36.🎯 How many elements on a page should have the same id? (a) 5 (b) 1 (c) any number (d) 2
  37. 37.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 120px;
      padding: 5px;
      border: 2px solid black;
      margin: 20px;
    }
  38. 38.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    h1 { color: blue; }
    h1 { color: red; }
    (a) blue (b) white (c) red (d) black
  39. 39.Which of these is a closing tag? (a) <title> (b) <body> (c) </p> (d) <h1>
  40. 40.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read

Answer key

  1. centres a heading
  2. white
  3. if
  4. True
  5. CSS
  6. packs boxes at the start
  7. index.html
  8. 1
  9. True
  10. white
  11. opens it in a new tab
  12. Yes
  13. Cricket Club
  14. <h5>
  15. 16
  16. share your OTP
  17. 16
  18. False
  19. 6
  20. write the HTML
  21. 9
  22. 59
  23. 5
  24. 6
  25. Match report
  26. Cascading Style Sheets
  27. hides what you type
  28. Read the fruit facts
  29. shows line numbers
  30. green
  31. <!DOCTYPE html>
  32. it tells its meaning
  33. red
  34. False
  35. adds 1 to i
  36. 1
  37. 134
  38. red
  39. </p>
  40. easy to read

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