Cascading Styles Sheets
Where HTML describes the structure of a web resource, Cascading Style Sheets (CSS) describes how the content should appear.
CSS can be stored in three ways:
- External CSS lives in its own document, which typically has the
.cssfile extension. External CSS is most often used when we want to control the styling of our entire website; most of the CSS used for a large site would be external. - Internal CSS is used within a given HTML page, and usually takes care of styling one specific page, which we might want to have a different appearance and feel to the rest of our site. Internal CSS is defined via the
<style>HTML tag. - Inline CSS is the most granular option, because it can be used to modify a specific HTML element. The style attribute can be added to any tag to specify its style. For example, we might want the title of a section of text to be red. To do so, we could use the element:
<p style=color:red;>Offensive Security</p>, which will modify the inline “Offensive Security” text.
Relevant Note(s):