Document 7
Document 7
Questions :
Ans : A website is a collection of web pages that are accessed via the
internet and typically share a common domain name. Websites can serve
various purposes, such as providing information, facilitating
communication, or offering services and products. They are built using
web technologies like HTML, CSS, and JavaScript.
Example of a Website
Wikipedia: https://www.wikipedia.org
Wikipedia is an online encyclopedia that provides a vast range of
information on various topics, contributed and edited by users
around the world.
2.What is a webpage ?
Ans : A website is a collection of web pages that are accessed via the
internet and typically share a common domain name. Websites can serve
various purposes, such as providing information, facilitating
communication, or offering services and products. They are built using
web technologies like HTML, CSS, and JavaScript.
Example of a Website
Wikipedia: https://www.wikipedia.org
Wikipedia is an online encyclopedia that provides a vast range of
information on various topics, contributed and edited by users
around the world.
3. What is HMLT ?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 20px;
h1 {
color: navy;
p{
color: darkslategray;
</style>
</head>
<body>
<h1>Welcome to My Webpage</h1>
</body>
</html>
Structured Scripting
javascript
// Function to add two numbers
function addNumbers(a, b) {
return a + b;
}
// Main function
function main() {
const num1 = 5;
const num2 = 10;
const result = addNumbers(num1, num2);
console.log(`The sum of ${num1} and ${num2} is $
{result}`);
}
4. What is script ?
Types of Scripts
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Simple Script Example</title>
<script>
// This function runs when the page loads
function showAlert() {
alert("Welcome to my webpage!");
}
</script>
</head>
<body onload="showAlert()">
<h1>Hello, World!</h1>
</body>
</html>
Console
5.What is code ?
python
# Function to add two numbers
def add_numbers(a, b):
return a + b
# Main code
num1 = 5
num2 = 10
result = add_numbers(num1, num2)
print(f"The sum of {num1} and {num2} is {result}")
7. What is instruction ?
Ans:
Code refers to the set of instructions written in a programming or
scripting language that tells a computer what to do. It is the fundamental
building block of software applications, websites, and other digital
systems.
python
# Function to add two numbers
def add_numbers(a, b):
return a + b
# Main code
num1 = 5
num2 = 10
result = add_numbers(num1, num2)
print(f"The sum of {num1} and {num2} is {result}")
Key Functions of Code
8. what is program ?
python
# Function to add two numbers
def add_numbers(a, b):
return a + b
# Main code
num1 = 5
num2 = 10
result = add_numbers(num1, num2)
print(f"The sum of {num1} and {num2} is {result}")
9. What is programming ?
python
# Function to add two numbers
def add_numbers(a, b):
return a + b
# Main code
num1 = 5
num2 = 10
result = add_numbers(num1, num2)
print(f"The sum of {num1} and {num2} is {result}")
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
line-height: 1.6;
header {
background: #4CAF50;
color: white;
padding: 10px 0;
text-align: center;
nav {
margin: 10px 0;
}
nav a {
margin: 0 15px;
color: white;
text-decoration: none;
section {
padding: 20px;
margin: 10px;
footer {
background: #222;
color: white;
text-align: center;
padding: 10px 0;
position: relative;
bottom: 0;
width: 100%;
</style>
</head>
<body>
<header>
<h1>Welcome to My Webpage</h1>
<nav>
<a href="#about">About</a>
<a href="#services">Services</a>
<a href="#contact">Contact</a>
</nav>
</header>
<section id="about">
<h2>About Us</h2>
</section>
<section id="services">
<h2>Our Services</h2>
<ul>
<li>Web Development</li>
<li>Graphic Design</li>
<li>SEO Services</li>
</ul>
</section>
<section id="contact">
<h2>Contact Us</h2>
<p>Email: [email protected]</p>
</section>
<footer>
</footer>
</body>
</html> About Us
We are a company dedicated to providing excellent services to our clients.
Our team is experienced and passionate about what we do.
Our Services
Web Development
Graphic Design
SEO Services
Contact Us
If you have any questions, feel free to reach out!
Email: [email protected]
© 2024 My Company
1. Doctype Declaration:
a. <!DOCTYPE html>: This declaration defines the document type
and version of HTML used, which helps browsers render the
page correctly.
2. HTML Element:
a. <html lang="en">: The root element of the webpage,
indicating that the language is English.
3. Head Section:
a. Contains <meta> tags for character set and viewport settings,
ensuring proper text rendering and responsive design.
b. <title> sets the title of the webpage, displayed in the
browser tab.
c. <style> includes CSS to define the visual appearance of
elements on the page.
4. Header:
a. <header> contains the main heading (<h1>) and a navigation
menu (<nav>), providing quick links to different sections of the
page.
5. Navigation:
a. <nav> includes links (<a>) that allow users to jump to different
sections, enhancing usability and accessibility.
6. Sections:
a. <section> elements are used to group related content, each
with its own heading (<h2>). This organization helps users
understand the structure of the information.
b. The first section provides information about the company, the
second lists services offered, and the third offers contact
details.
7. Footer:
a. <footer> contains copyright information and serves as a
closing element for the webpage, providing additional context
about the site.
Conclusion