CSS
CSS stands for Cascading Style Sheets. It is a style sheet language which is used to describe the look and formatting of an HTML elements, including the design, layout and variations in display for different devices and screen sizes. It provides an additional feature to HTML.
CSS syntax:
CSS is a rule-based language — you define rules specifying groups of styles that should be applied to particular elements or groups of elements on your web page. For example:
There are three different ways to insert CSS style sheet within the HTML file:
-
External CSS
With an external style sheet, you can change the look of an entire website by changing just one file. Each HTML page must include a reference to the external style sheet file inside the element, inside the head section. -
Internal CSS
An internal style sheet may be used if one single HTML page has a unique style. The internal style is defined inside the<style>
element, inside the head section. -
Inline CSS
An inline style may be used to apply a unique style for a single element. To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.