← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 969 · 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 colour pair is easy to read? (a) light grey on white (b) red on green (c) black on white (d) blue on purple
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  3. 3.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) switch off the PC (c) rename the folder (d) delete the file
  4. 4.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <h4>I love mangoes.</h4>
    <p>Rain today</p>
    <h2>Fun facts</h2>
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  6. 6.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
  7. 7.📄 Can HTML on its own make headings? (a) Yes (b) No
  8. 8.⚖️ What colour is the text of this element?
    <p class="note" id="intro">Hi</p>
    CSS:
    #intro { color: yellow; }
    #intro { color: orange; }
    (a) yellow (b) blue (c) orange (d) red
  9. 9.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  10. 10.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>My pets</p>
  11. 11.🎯 Which element does the selector #hero style? (a) <span class="hero"> (b) <span id="hero"> (c) <span id="top"> (d) <p class="box">
  12. 12.🌍 What is the path in this URL?
    http://kids.example.org/art/gallery.html
    (a) kids.example.org (b) /art/gallery.html (c) http (d) /news/today.html
  13. 13.⚡ What number does this code print?
    let a = 6;
    let b = 3;
    console.log(a * b);
  14. 14.True or false: in <img>, alt tells which image to load. (a) True (b) False
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <u>Fun facts</u>
    line 2: <h2>Hello, world!</h2>
    line 3: <b>My pets
    (a) line 3 (b) line 1 (c) line 2
  16. 16.🔐 Is password a strong or a weak password? (a) weak (b) strong
  17. 17.🖌️ Where does the text sit on its line?
    h1 {
      color: green;
      background-color: orange;
      text-align: right;
      font-size: 32px;
    }
    (a) on the left (b) on the right (c) in the middle
  18. 18.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  19. 19.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 100px;
      padding: 25px;
      border: 1px solid black;
      margin: 10px;
    }
  20. 20.🛡️ Online: is it safe to ask before downloading? (a) not safe (b) safe
  21. 21.True or false: <style> goes in the body. (a) True (b) False
  22. 22.What does text-align do? (a) makes letters bigger (b) picks the font style (c) centres a heading (d) makes the text bold
  23. 23.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) Contact us (b) about.html (c) contact.html (d) https://example.com
  24. 24.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 18px;
      }
    }
  25. 25.True or false: <tr> makes one table row. (a) False (b) True
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <strong>Hello, world!</strong>
    line 2: <small>My best friend</small>
    line 3: <em>Cricket is fun.
    (a) line 3 (b) line 1 (c) line 2
  27. 27.🎯 What kind of selector is .menu? (a) an element selector (b) an id selector (c) a class selector
  28. 28.🧩 Which language makes a form box? (a) HTML (b) CSS (c) JavaScript
  29. 29.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  30. 30.⚡ Which JavaScript word makes a new variable? (a) if (b) alert() (c) let (d) console.log()
  31. 31.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
  32. 32.What is <input type="password"> for? (a) sends the form (b) hides what you type (c) lets you tick many (d) takes only numbers
  33. 33.🔍 Which is the odd one out? (a) counts down a timer (b) reacts to a button click (c) gives the page structure (d) shows a pop-up message
  34. 34.🧩 Which language puts a picture on a page? (a) JavaScript (b) CSS (c) HTML
  35. 35.⚡ What does this code show?
    let name = "Riya";
    alert("Well done, " + name + "!");
    (a) Well done, Riya! (b) Well done, name! (c) Riya (d) name
  36. 36.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) write the HTML (b) add CSS styles (c) publish it online (d) test in a browser
  37. 37.💪 Which flexbox property spaces boxes along a row? (a) display: flex (b) align-items (c) flex-direction (d) justify-content
  38. 38.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
  39. 39.🧩 Which language shows a pop-up message? (a) HTML (b) JavaScript (c) CSS
  40. 40.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) for (d) if

Answer key

  1. black on white
  2. Yes
  3. save and refresh
  4. 3
  5. <h1>
  6. </head>
  7. Yes
  8. orange
  9. Yes
  10. 3
  11. <span id="hero">
  12. /art/gallery.html
  13. 18
  14. False
  15. line 3
  16. weak
  17. on the right
  18. a code editor
  19. 172
  20. safe
  21. False
  22. centres a heading
  23. about.html
  24. 18
  25. True
  26. line 3
  27. a class selector
  28. HTML
  29. the body
  30. let
  31. starts a new line
  32. hides what you type
  33. gives the page structure
  34. HTML
  35. Well done, Riya!
  36. write the HTML
  37. justify-content
  38. a web browser
  39. JavaScript
  40. for

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