Basics of HTML and CSS
1. Introduction to Coding
Coding is the process of creating instructions for computers using programming languages. HTML
and CSS are fundamental web technologies that help in structuring and styling websites.
2. Basics of HTML
HTML (HyperText Markup Language) is used to structure web pages. Below is a simple example:
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a simple paragraph.</p>
</body>
</html>
3. Basics of CSS
CSS (Cascading Style Sheets) is used to style HTML elements. Below is an example:
body {
background-color: lightblue;
font-family: Arial, sans-serif;
}
h1 {
color: navy;
text-align: center;
}
4. Linking HTML and CSS
To apply CSS to HTML, use the <link> tag inside the <head> section:
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
5. Conclusion
With HTML and CSS, you can create beautiful web pages. Keep practicing, and try building simple
projects like personal websites, blogs, or portfolio pages.