HTML and CSS Assignment
Study the questions carefully and write your answers in your exercise book.
Instructions: Answer all questions. Write clearly and rewrite the required HTML code in your exercise book where instructed.
Question 1: Understanding HTML and CSS
Study the HTML and CSS code below and answer the questions that follow.
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
- What is the meaning of HTML?
- What is the function of the <h1> tag?
- What is the function of the <p> tag?
- What is the purpose of the <style> tag?
- What is the background colour of the web page?
Question 2: Understanding CSS
Answer the following questions:
- Which CSS property is used to change the background colour of a web page?
- Which CSS property is used to change the colour of a heading?
- What colour is assigned to the heading in the given code?
- What colour is assigned to the paragraph in the given code?
- What is CSS, and what is its function in web development?
Question 3: Practical Application
Rewrite the HTML code in your exercise book and make the following changes:
- Change the background colour to yellow.
- Change the heading colour to green.
- Change the paragraph colour to black.
- Change the heading text to Welcome to My School.
- Change the paragraph text to I am learning HTML and CSS.
Remember to write the complete HTML code, including the opening and closing tags.
Submission Instructions
- Answer all questions in your exercise book.
- Write your name and class on your work.
- Ensure your handwriting is clear and readable.
- Submit your work to the coding instructors.