Web Development
Basics
An Introduction to HTML and CSS
What is Web Development?
Web development refers to the creation and maintenance
of websites.
- Front-end (HTML, CSS, JavaScript)
- Back-end (Server-side programming)
- Full-stack (Both front-end and back-end)
What is HTML?
HTML stands for HyperText Markup Language.
- Standard language for creating web pages.
- Describes the structure of a webpage using tags.
- Example: <html>, <head>, <body>, <h1>, <p>
Basic Structure of HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
What is CSS?
CSS stands for Cascading Style Sheets.
- Used to style and layout web pages.
- Controls color, fonts, spacing, positioning.
- Can be internal, external, or inline.
Types of CSS
1. Inline CSS: style attribute in HTML elements.
2. Internal CSS: inside <style> tag in the head.
3. External CSS: separate .css file linked with <link> tag.
Basic CSS Syntax
selector {
property: value;
}
Example:
p{
color: blue;
font-size: 16px;
}
Combining HTML and CSS
HTML provides the structure, CSS styles the structure.
<!DOCTYPE html>
<html>
<head>
<style>
p { color: green; }
</style>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
Summary
- HTML defines the structure of web pages.
- CSS defines the style of the content.
- Both are essential for front-end web development.