Introduction to Web Development: Day - 2 - CareerConnect

Search This Blog

Monday 5 June 2023

Introduction to Web Development: Day - 2

Welcome to Day 2 of our tech education channel! Today, we'll introduce you to the exciting world of web development. Let's dive in!

1. Overview of HTML, CSS, and JavaScript:

HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), and JavaScript are the three core technologies used in web development.


- HTML: HTML is the markup language used to structure the content of a webpage. It defines the elements and layout of the page, such as headings, paragraphs, images, and links.


- CSS: CSS is responsible for the visual presentation of a webpage. It allows you to style and customize the appearance of HTML elements, including colors, fonts, layout, and responsiveness.


- JavaScript: JavaScript is a programming language that adds interactivity and functionality to a webpage. It enables dynamic content, event handling, form validation, and more.


2. Role of each language in web development:

- HTML: HTML provides the structure and content of a webpage. It defines the elements that make up the page, such as headings, paragraphs, lists, images, and links. HTML tags are used to mark up the content and define its purpose.


- CSS: CSS is used to enhance the visual appearance of a webpage. It allows you to style HTML elements by changing colors, fonts, sizes, margins, and positioning. CSS enables you to create a visually appealing and consistent design across different web pages.


- JavaScript: JavaScript adds interactivity and functionality to a webpage. It allows you to respond to user actions, manipulate the HTML and CSS dynamically, handle events like button clicks, validate form input, and even make requests to servers for data.


3. Creating a simple webpage using HTML and CSS:

To create a simple webpage, follow these steps:

Step 1: Open a text editor or an integrated development environment (IDE) like Visual Studio Code.

Step 2: Start with an HTML document structure by typing the following code:


<!DOCTYPE html>

<html>

<head>

  <title>My Simple Webpage</title>

  <link rel="stylesheet" href="styles.css">

</head>

<body>

  <h1>Welcome to My Webpage</h1>

  <p>This is a simple webpage created using HTML and CSS.</p>

</body>

</html>


Step 3: Save this file with an ".html" extension (e.g., "index.html").


Step 4: Create a new file in the same directory and name it "styles.css".


Step 5: Open the "styles.css" file and add the following code:


body {

  background-color: lightblue;

  font-family: Arial, sans-serif;

}


h1 {

  color: navy;

}


p {

  color: darkblue;

}


Step 6: Save the "styles.css" file.


Step 7: Open the "index.html" file in a web browser, and you'll see your simple webpage with a light blue background, a navy-colored heading (h1), and dark blue paragraphs (p).


Congratulations! You have created your first simple webpage using HTML and CSS.


Remember, this is just a starting point. As you continue learning web development, you'll discover more HTML elements, CSS properties, and JavaScript features to enhance your webpages.


That's all for today's session. In the upcoming days, we'll explore web development further and delve into more advanced concepts and techniques. Stay tuned!

No comments:

Post a Comment