CSS
WHAT IS CSS?
•CSS stands for Cascading Style Sheets.
•CSS is a language used to style the
appearance of web pages.
•It controls the layout, color scheme, fonts,
and overall presentation of a webpage.
CSS SYNTAX
Selector: Defines which HTML element(s) the style will apply to.
Property: Specifies what aspect of the element will be styled (e.g., color,
font-size, margin).
Value: Defines the value for the property (e.g., "red" for color, "16px" for
font-size).
TYPES OF
CSS
We three ways to apply CSS to HTML
a) Inline CSS: its applied directly within an HTML element using <style>
attribute <p style="color: blue; font-size: 16px;">HELLO WORLD</p>
b) Internal CSS: its written within style tags mostly in the head section of
html documents <style> p { color: blue; font-size: 16px; } </style>
c) External CSS: this most widely used styling type, css is written in
separate file with .CSS extension and its linked to HTML file using link tag
<head>
<link rel="stylesheet" type="text/css" href="[Link]">
</head>