← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 994 · 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: in <img>, height shows if the image fails. (a) False (b) True
  2. 2.✍️ What value is given to font-style in this rule?
    p {
      background-color: yellow;
      font-size: 20px;
      font-style: italic;
    }
    (a) 20px (b) red (c) font-style (d) italic
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <h2>I love mangoes.</h2>
    line 2: <small>Hello, world!
    line 3: <u>My best friend</u>
    (a) line 3 (b) line 1 (c) line 2
  4. 4.🔁 What does this code print?
    let marks = 14;
    if (marks < 22) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  5. 5.🎯 Which element does the selector .star style? (a) <span id="star"> (b) <span class="menu"> (c) <span class="star"> (d) <p class="note">
  6. 6.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) rename the folder (c) switch off the PC (d) delete the file
  7. 7.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
  8. 8.Which of these is safe to do online? (a) post your home address (b) share your password (c) type a password on http (d) log out on shared PCs
  9. 9.True or false: HTML on its own can keep a high score. (a) False (b) True
  10. 10.🧭 Which semantic tag holds one blog post? (a) <header> (b) <footer> (c) <main> (d) <article>
  11. 11.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 20px;
      }
    }
    (a) No (b) Yes
  12. 12.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <h2>Our school trip</h2>
    <h2>Fun facts</h2>
  13. 13.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    (a) I love mangoes. (b) Good morning! (c) Fun facts (d) My best friend
  14. 14.📦 In the box model, which part is the gap to other boxes? (a) padding (b) content (c) border (d) margin
  15. 15.✍️ Which property is set to yellow in this rule?
    h2 {
      background-color: yellow;
      margin: 10px;
      padding: 8px;
    }
    (a) yellow (b) background-color (c) padding (d) margin
  16. 16.True or false: margin is space outside the border. (a) False (b) True
  17. 17.True or false: HTML on its own cannot make a form. (a) True (b) False
  18. 18.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<nav>”? (a) <nav> (b) <header>
  19. 19.📝 Which input type lets you pick only one? (a) text (b) checkbox (c) radio (d) submit
  20. 20.📊 Which tag makes a heading cell? (a) <th> (b) <td> (c) <tr> (d) <caption>
  21. 21.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  22. 22.Which colour pair is easy to read? (a) yellow on white (b) light grey on white (c) white on dark blue (d) blue on purple
  23. 23.✍️ In color: blue; which part is the value? (a) ; (b) : (c) color (d) blue
  24. 24.Which of these is an empty tag? (a) <p> (b) <title> (c) <input> (d) <ul>
  25. 25.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  26. 26.True or false: <footer> sits at the bottom. (a) True (b) False
  27. 27.🔍 One closing tag is missing. Which one?
    <i>My pets</i>
    <small>The red kite</small>
    <h2>Cricket is fun.
    (a) </i> (b) </small> (c) </p> (d) </h2>
  28. 28.⚖️ What colour is the text of this element?
    <h1 class="big" id="logo">Hi</h1>
    CSS:
    .big { color: white; }
    #logo { color: purple; }
    h1 { color: blue; }
    (a) white (b) purple (c) red (d) blue
  29. 29.🖌️ What colour is behind the letters?
    li {
      color: purple;
      background-color: black;
      text-align: left;
      font-size: 36px;
    }
    (a) blue (b) black (c) purple
  30. 30.🌍 Which one stores the site’s files? (a) the browser (b) the URL (c) HTTPS (d) the server
  31. 31.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) </u> (d) <u>
  32. 32.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 14px;
      }
    }
  33. 33.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) contact.html (b) https://example.com (c) Take the quiz (d) about.html
  34. 34.True or false: <ul><li>Art</li></ul> goes in style.css. (a) True (b) False
  35. 35.🌍 Which one sends the page back? (a) HTTPS (b) the server (c) the browser (d) the URL
  36. 36.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <body>
  37. 37.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) Play games (b) quiz.html (c) href (d) Take the quiz
  38. 38.🎨 Which tag connects an outside CSS file? (a) <a> (b) <img> (c) <link> (d) <css>
  39. 39.✍️ CSS declarations go inside which brackets? (a) ( ) (b) { } (c) < > (d) [ ]
  40. 40.🔠 Are headings shown in bold by default? (a) No (b) Yes

Answer key

  1. False
  2. italic
  3. line 2
  4. Pass
  5. <span class="star">
  6. save and refresh
  7. HyperText
  8. log out on shared PCs
  9. False
  10. <article>
  11. No
  12. 1
  13. Fun facts
  14. margin
  15. background-color
  16. True
  17. False
  18. <header>
  19. radio
  20. <th>
  21. <li>
  22. white on dark blue
  23. blue
  24. <input>
  25. <a href="about.html">
  26. True
  27. </h2>
  28. purple
  29. black
  30. the server
  31. </u>
  32. 14
  33. about.html
  34. False
  35. the server
  36. <!DOCTYPE html>
  37. Take the quiz
  38. <link>
  39. { }
  40. Yes

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