Include CSS in html
I am wondering is it possible to enter CSS in HTML.
Heard first time. Let me know if possible and how exactly.
asked by ross
Yes, it is possible.
You could create a css file (example.css) and you can include it in your HTML file between <head></head> tags, with:
<link rel="stylesheet" type="text/css" href="example.css" >
(If the css file is not located in the same folder as your HTML file, you must write the entire path on ...href="PATH OR ENTIRE URL TO/example.css"... in above code.
You can add your css code directly in your HTML file
WRITE HERE YOUR CSS STYLE CODE
(Recommend: place it between head tags)
On each element from your HTML, you can add a css style. For example, let's say that you have a div:
You can style it with css:
<div style=" ADD HERE THE STYLE - I.E: color: blue; font-weight: bold; ETC ">My text...</div>
The same as above applies to all: <span>, <p> etc.