We’ve moved onto the pretty bit of CSS over the next few classes. What CSS allows is to control layout and make changes across multiple web pages all at once using. Usually, the stylesheet is saved externally in a stylesheet in a .css file and linked to HTML using the <link> tag. See example using tags, id’s and classes below.
However, CSS can also be added internally in the head of the document using <style> tag and inline where rules are embedded into the HTML tags themselves i.e.
<p style=”colour: green;”>Green text</p>
The last one should be however avoided when possible.
Finally, we talked about the priority in which a browser loads stylesheets:
- External style sheet
- Internal style sheet
So inline beats internal and internal beats external. Simple, right?