Web Design Basics with HTML and CSS
HTML and CSS form the backbone of web design. HTML is used for creating the structure of web pages, and CSS is used for styling them. In this tutorial, we will explore how to create simple, well-designed web pages using HTML and CSS.
1. The Basic HTML Structure
HTML uses tags to structure content. Here is a simple HTML page layout:
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to Web Design!</h1>
<p>This is a basic webpage created with HTML and styled with CSS.</p>
</body>
</html>
2. Adding CSS to Style the Page
CSS allows you to style HTML elements. Here’s an example of how to change the color and font style of your page:
body {
background-color: lightblue;
font-family: Arial, sans-serif;
}
h1 {
color: darkblue;
}
3. Layouts in CSS
Learn how to structure your page layout using basic CSS properties like padding, margin, and borders:
div {
padding: 20px;
margin: 20px;
border: 1px solid black;
}
Conclusion: HTML and CSS are the building blocks of every website. By learning these languages, you can create well-structured, styled, and functional web pages!
Comments
Post a Comment