Today I studied the basics of CSS or Cascading Style Sheets and what CSS does in web development. CSS is used to style web pages and make them look better. With CSS, we can change colors, fonts, sizes, and the layout of elements on a page. It helps separate the design from the content, which makes the code cleaner and easier to manage.
One of the first things I learned was CSS selectors. Selectors are used to choose which HTML element you want to style. For example, to style a paragraph:
p {
color: blue;
}
I also learned about properties and values. A property is what you want to change, and the value is how you change it. For example, changing font size:
h1 {
font-size: 32px;
}
I learned about fonts and text styling too. CSS allows us to change how text looks:
p {
font-family: Arial, sans-serif;
text-align: center;
}
Spacing was another important lesson. I learned about margin and padding, which help control space around elements:
div {
margin: 20px;
padding: 10px;
}
Top comments (0)