← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 558 · 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.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) publish it online (b) write the HTML
  2. 2.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 280px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  3. 3.🚀 Which tag loads script.js into a page? (a) <script src="script.js"> (b) <a href="script.js"> (c) <link script.js> (d) <js src="script.js">
  4. 4.Which of these is a strong password? (a) qwerty (b) iloveyou (c) 123456 (d) S0lar!Pen#8
  5. 5.Which colour pair is easy to read? (a) pink on red (b) dark grey on white (c) light grey on white (d) yellow on white
  6. 6.✍️ CSS declarations go inside which brackets? (a) { } (b) < > (c) [ ] (d) ( )
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  8. 8.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: center;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  9. 9.🎯 Which element does the selector .note style? (a) <span class="big"> (b) <span id="note"> (c) <p class="red"> (d) <span class="note">
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) index.html (c) Easy snacks (d) Thanks for visiting.
  11. 11.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  12. 12.🚀 Which file is best for the colours and fonts? (a) style.css (b) photo.jpg (c) script.js (d) index.html
  13. 13.✍️ What value is given to color in this rule?
    .box {
      color: red;
      border: 2px solid;
      background-color: yellow;
    }
    (a) color (b) red (c) 20px (d) center
  14. 14.🔠 Are headings shown in bold by default? (a) Yes (b) No
  15. 15.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
  16. 16.🎯 Which sign starts a class selector? (a) & (b) . (c) # (d) @
  17. 17.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) switch off the PC (c) delete the file (d) rename the folder
  18. 18.🖌️ How big is the text, in px?
    p {
      text-align: center;
      font-size: 20px;
      background-color: orange;
      color: red;
    }
  19. 19.🎯 What kind of selector is .card? (a) an element selector (b) a class selector (c) an id selector
  20. 20.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  21. 21.True or false: JavaScript puts a picture on a page. (a) False (b) True
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Stars shine</p>
  23. 23.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>My pets</p>
  24. 24.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) colours code to help us (d) answers page requests
  25. 25.Which of these is a weak password? (a) S0lar!Pen#8 (b) Kite_Fl1es@Dawn (c) 111111 (d) Chai$Cup_19x
  26. 26.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  27. 27.Which of these is the content? (a) the text or picture (b) the gap round content (c) space outside the border (d) the gap to other boxes
  28. 28.⚡ What does this code show?
    let name = "Aman";
    alert("Hi, " + name + "!");
    (a) Hi, Aman! (b) Aman (c) name (d) Hi, name!
  29. 29.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  30. 30.🖌️ Which CSS property makes letters bigger? (a) font-weight (b) color (c) font-family (d) font-size
  31. 31.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
  32. 32.🖌️ Which CSS property makes the text bold? (a) font-family (b) font-weight (c) text-align (d) background-color
  33. 33.🚀 Which file should this code go in: alert(score); (a) index.html (b) style.css (c) script.js
  34. 34.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
  35. 35.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.
    <strong>My pets</strong>
    <h2>Good morning!</h2>
    (a) </i> (b) </strong> (c) </h2> (d) </p>
  36. 36.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="checkbox" name="colour"> Green
      <input type="checkbox" name="colour"> Red
      <input type="checkbox" name="colour"> Pink
      <input type="checkbox" name="colour"> Blue
    </form>
  37. 37.🧭 Is <section> semantic or not semantic? (a) not semantic (b) semantic
  38. 38.🧩 Which language sets colours and fonts? (a) JavaScript (b) HTML (c) CSS
  39. 39.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  40. 40.📝 How many <input> tags are in this form?
    <form>
      <input type="password">
      <input type="email">
      <input type="number">
      <input type="checkbox">
      <input type="submit" value="Send">
    </form>

Answer key

  1. write the HTML
  2. 40
  3. <script src="script.js">
  4. S0lar!Pen#8
  5. dark grey on white
  6. { }
  7. 2
  8. 10
  9. <span class="note">
  10. Space Facts
  11. Yes
  12. style.css
  13. red
  14. Yes
  15. <h5>
  16. .
  17. save and refresh
  18. 20
  19. a class selector
  20. alt
  21. False
  22. 3
  23. 1
  24. answers page requests
  25. 111111
  26. a web browser
  27. the text or picture
  28. Hi, Aman!
  29. -->
  30. font-size
  31. easy to read
  32. font-weight
  33. script.js
  34. hard to read
  35. </i>
  36. 4
  37. semantic
  38. CSS
  39. an attribute
  40. 5

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