CSS, or Cascading Style Sheets, is used to make your web pages look attractive. It's like adding colors, fonts, and layouts to your HTML structure.
Let's change the appearance of our previous HTML page:
index.html
file, add the following inside the
section:<style>
body {
font-family: Arial, sans-serif;
background-color: #f3f3f3;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: white;
text-align: center;
padding: 10px;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav li {
display: inline;
margin-right: 20px;
}
footer {
text-align: center;
padding: 5px;
}
</style>