← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 135 · 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.True or false: <input type="submit"> sends the form. (a) False (b) True
  2. 2.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  3. 3.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My best friend</h2>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  4. 4.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  5. 5.🔢 On a typical page, from top to bottom, which comes first: “<footer>” or “<header>”? (a) <footer> (b) <header>
  6. 6.✍️ Which sign goes between a property and its value? (a) = (b) - (c) ; (d) :
  7. 7.Which of these is a strong password? (a) riya2014 (b) S0lar!Pen#8 (c) 111111 (d) qwerty
  8. 8.🎨 Which tag holds CSS inside the head? (a) <body> (b) <script> (c) <style> (d) <css>
  9. 9.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
  10. 10.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  11. 11.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  12. 12.True or false: in <img>, height shows if the image fails. (a) True (b) False
  13. 13.🔍 Which is the odd one out? (a) counts down a timer (b) puts a picture on a page (c) makes a link (d) makes headings and lists
  14. 14.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  15. 15.🖌️ How big is the text, in px?
    h1 {
      font-size: 12px;
      background-color: orange;
      text-align: right;
      color: yellow;
    }
  16. 16.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) add CSS styles (b) plan what to show (c) publish it online (d) write the HTML
  17. 17.🔢 To build and share your first web page, which comes first: “add CSS styles” or “plan what to show”? (a) add CSS styles (b) plan what to show
  18. 18.📊 Which tag holds the whole table? (a) <caption> (b) <td> (c) <table> (d) <th>
  19. 19.⚖️ What colour is the text of this element?
    <p class="big" id="main">Hi</p>
    CSS:
    .big { color: green; }
    .big { color: blue; }
    (a) blue (b) green (c) black (d) white
  20. 20.Which of these is padding? (a) a solid or dotted edge (b) the text or picture (c) the line round the box (d) space inside the border
  21. 21.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/about.html
    (a) Yes (b) No
  22. 22.Which of these is an opening tag? (a) </body> (b) </title> (c) </b> (d) <p>
  23. 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  25. 25.🔍 One closing tag is missing. Which one?
    <small>Fun facts</small>
    <h1>My best friend
    <strong>Hello, world!</strong>
    (a) </small> (b) </strong> (c) </i> (d) </h1>
  26. 26.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
  27. 27.⚖️ What colour is the text of this element?
    <h2 class="menu" id="logo">Hi</h2>
    CSS:
    #logo { color: white; }
    .menu { color: red; }
    (a) green (b) orange (c) red (d) white
  28. 28.🔁 When does the else part run? (a) when if is true (b) always (c) when if is false (d) never
  29. 29.True or false: CSS gives the page structure. (a) False (b) True
  30. 30.🔐 Is password a strong or a weak password? (a) weak (b) strong
  31. 31.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  32. 32.🌈 Which colour is #ffffff? (a) cyan (b) black (c) blue (d) white
  33. 33.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + i;
    }
    console.log(total);
  34. 34.✍️ Which property is set to red in this rule?
    p {
      color: red;
      border: 2px solid;
      font-size: 20px;
    }
    (a) text-align (b) font-size (c) red (d) color
  35. 35.🔁 What does this code print?
    let marks = 33;
    if (marks < 25) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  36. 36.True or false: <style> goes in the body. (a) True (b) False
  37. 37.True or false: h1 is an id selector. (a) False (b) True
  38. 38.📝 Which input type is for an email address? (a) submit (b) email (c) checkbox (d) radio
  39. 39.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No
  40. 40.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>

Answer key

  1. True
  2. in a new tab
  3. 2
  4. No
  5. <header>
  6. :
  7. S0lar!Pen#8
  8. <style>
  9. the screen width
  10. href
  11. Yes
  12. False
  13. counts down a timer
  14. <
  15. 12
  16. publish it online
  17. plan what to show
  18. <table>
  19. blue
  20. space inside the border
  21. Yes
  22. <p>
  23. width
  24. bullets
  25. </h1>
  26. to describe the image
  27. white
  28. when if is false
  29. False
  30. weak
  31. 6
  32. white
  33. 36
  34. color
  35. Try again
  36. False
  37. False
  38. email
  39. No
  40. <a>

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