Introduction to CSS
After completing this module, you are expected to:
- Understand the basic syntax of CSS
- Identify the different types of CSS selectors
In the previous module, you have learned about best practices for web design and layout. The design and layout of the webpage is possible with the help of CSS. In this module, you will be able to learn about CSS – its syntax and selectors.
CSS stands for Cascading Style Sheets. It is a design language that is used to define how an HTML element should be displayed on the screen or in any media (CSS Introduction, n.d.). The CSS works by associating rules with HTML elements. Using these rules, you can add style on the content of a specified element of the page. Styling an entire webpage might be a complex process but defining a simple CSS rule can be easily understood. Below is an example of a simple CSS rule.
p {
color: blue;
}
CSS allows you to control the layout and design of an HTML document. It can change the color of the text, font style and other design and layout. Applying CSS would require a styling rule which will be interpreted by the browser (CSS - Syntax - Tutorialspoint, n.d.).