← Your first website lesson New set →

Web Worksheet: Your First Website

HTML and CSS lesson 29: Your first website · Set 66 · 40 questions
TalentJR

Code tip (One file per job): Tags → index.html; selector { … } → style.css; let, alert, console.log → script.js. Plan → write the HTML → add CSS → test in a browser → publish. Use small letters and dashes in file names; save and refresh to see changes.

NameDateTime takenScore ___ / 40
  1. 1.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) style.css (b) index.html (c) script.js
  2. 2.🚀 Which file should this code go in: let score = 0; (a) script.js (b) index.html (c) style.css
  3. 3.🔢 To build and share your first web page, what comes right after “test in a browser”? (a) plan what to show (b) write the HTML (c) publish it online (d) add CSS styles
  4. 4.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
  5. 5.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) delete the file (c) rename the folder (d) switch off the PC
  6. 6.True or false: body { margin: 0; } goes in script.js. (a) True (b) False
  7. 7.True or false: p { color: red; } goes in script.js. (a) False (b) True
  8. 8.🚀 Which file is best for the colours and fonts? (a) photo.jpg (b) index.html (c) style.css (d) script.js
  9. 9.🚀 Which tag loads script.js into a page? (a) <link script.js> (b) <js src="script.js"> (c) <a href="script.js"> (d) <script src="script.js">
  10. 10.True or false: alert(score); goes in style.css. (a) True (b) False
  11. 11.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) script.js (c) style.css
  12. 12.🔢 To build and share your first web page, what comes right after “add CSS styles”? (a) write the HTML (b) plan what to show (c) publish it online (d) test in a browser
  13. 13.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) index.html (b) script.js (c) style.css
  14. 14.🚀 Which file should this code go in: p { color: red; } (a) script.js (b) index.html (c) style.css
  15. 15.True or false: <h1>My Site</h1> goes in index.html. (a) False (b) True
  16. 16.🚀 Which file should this code go in: console.log(5 + 2); (a) script.js (b) style.css (c) index.html
  17. 17.True or false: score = score + 1; goes in script.js. (a) False (b) True
  18. 18.True or false: alert("Hi"); goes in script.js. (a) True (b) False
  19. 19.🚀 Which file should this code go in: #top { color: blue; } (a) index.html (b) script.js (c) style.css
  20. 20.🚀 Which program lets you see your web page while you build it? (a) a calculator (b) a photo viewer (c) a web browser (d) a music player
  21. 21.🔢 To build and share your first web page, which comes first: “publish it online” or “add CSS styles”? (a) add CSS styles (b) publish it online
  22. 22.🚀 What is the home page file of a website usually called? (a) index.html (b) home.css (c) start.js (d) main.png
  23. 23.🚀 Which file should this code go in: alert(score); (a) script.js (b) style.css (c) index.html
  24. 24.🚀 Should file names have spaces, like my page.html? (a) No (b) Yes
  25. 25.True or false: <ul><li>Art</li></ul> goes in script.js. (a) False (b) True
  26. 26.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) style.css (c) script.js
  27. 27.True or false: <p>Hello!</p> goes in index.html. (a) True (b) False
  28. 28.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) plan what to show (c) write the HTML (d) add CSS styles
  29. 29.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) script.js (c) index.html
  30. 30.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
  31. 31.🚀 Which file should this code go in: alert("Hi"); (a) index.html (b) style.css (c) script.js
  32. 32.True or false: alert("Hi"); goes in index.html. (a) False (b) True
  33. 33.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) notes.txt (c) script.js (d) index.html
  34. 34.True or false: .box { padding: 8px; } goes in index.html. (a) False (b) True
  35. 35.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) script.js (c) index.html
  36. 36.True or false: p { color: red; } goes in style.css. (a) False (b) True
  37. 37.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) write the HTML (b) publish it online
  38. 38.True or false: score = score + 1; goes in style.css. (a) True (b) False
  39. 39.🔢 To build and share your first web page, which comes first: “plan what to show” or “publish it online”? (a) publish it online (b) plan what to show
  40. 40.🔢 To build and share your first web page, which comes LAST? (a) plan what to show (b) add CSS styles (c) publish it online (d) write the HTML

Answer key

  1. style.css
  2. script.js
  3. publish it online
  4. False
  5. save and refresh
  6. False
  7. False
  8. style.css
  9. <script src="script.js">
  10. False
  11. index.html
  12. test in a browser
  13. index.html
  14. style.css
  15. True
  16. script.js
  17. True
  18. True
  19. style.css
  20. a web browser
  21. add CSS styles
  22. index.html
  23. script.js
  24. No
  25. False
  26. index.html
  27. True
  28. plan what to show
  29. index.html
  30. True
  31. script.js
  32. False
  33. script.js
  34. False
  35. style.css
  36. True
  37. write the HTML
  38. False
  39. plan what to show
  40. publish it online

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