Tsallaka zuwa abun ciki
Justice Tech School

How To Add CSS

CSS can be inline with the style attribute, internal in a style element or external in a linked .css file. External files are best because many pages share them and the browser caches them.

Example
<style>
p { color: #5eead4 }
</style>
<p style="font-size:18px">Inline plus internal styles</p>

Exercise

Attach an external file.

<link rel="stylesheet" ="style.css">

Quiz Test

Which method is best for many pages?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.