Activity 1
Correct Answers
1. What type of development covers both client-side and server-side work? ✅ Full-stack development
2. What is the primary use of CSS? ✅ Styling web pages
3. What is the file extension for an external JavaScript file? ✅ .js
4. What is a core responsibility of a back-end developer? ✅ Managing databases
5. What is the primary focus of front-end development? ✅ Interactive user experience
6. What is an advantage of using external JavaScript files? ✅ Easier maintenance
7. What feature is JavaScript NOT used for? ✅ Database design
8. Who created JavaScript? ✅ Brendan Eich
9. What is JavaScript primarily used for in web development? ✅ Adding interactive and dynamic behavior to web pages
10. What does back-end development primarily handle? ✅ Server-side logic
Instructions:
Set Up Your Development Environment
- Open your preferred code editor (e.g., VS Code, Sublime Text, or Notepad++).
- Create a new file and save it with the
.htmlextension (e.g., Activity1.html).
Create a Basic Webpage
- Structure your HTML document with
<html>,<head>, and<body>sections. - Set a title for your webpage.
Add Content to the Page
- Inside the
<body>, add an<h1>element that displays "Hello, World!". - Add a
<button>element with the label "Change Color". - Ensure the button changes the text color of the
<h1>element to red when clicked.
Implement the Functionality
- Use JavaScript within the
onclickattribute of the button to change the color of the<h1>. - Ensure that clicking the button updates the color without needing a separate function.
Final Output
- Your webpage should:
- ✅ Display "Hello, World!" as a heading.
- ✅ Include a "Change Color" button.
- ✅ Change the color of "Hello, World!" to red when the button is clicked.
Document
Hello, World!