Is it possible to include CSS in html

Joe S.

New member
Joined
Jul 12, 2014
Messages
84
Points
0
I am working out on a web design project with a friend.

I was wondering is it possible to enter CSS in HTML

Heard first time. I think no !!

But let me know if possible and how exactly.
 
Joined
Jul 11, 2014
Messages
40
Points
8
SSD or SSD Cached

Yes, it is possible.

Method 1

You could create a css file (example.css) and you can include it in your HTML file between
HTML:
<head> </head>
, with:
Code:
<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.xss"... in above code.

Method 2

You can add your css code directly in your HTML file

HTML:
<style>
WRITE HERE YOUR CSS STYLE CODE
</style>
(Recommend: place it between
HTML:
<head> </head>
)

Method 3

On each element from your HTML, you can add a css style. For example, let's say that you have a div:

HTML:
<div>My text...</div>
You can style it with css:

HTML:
<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.
 
Older threads
Replies
4
Views
3,954
Replies
3
Views
4,262
Replies
2
Views
2,919
Newer threads
Replies
6
Views
4,352
Replies
4
Views
2,839
Replies
4
Views
3,584
Replies
0
Views
4,502
Latest threads
Replies
1
Views
52
Replies
1
Views
203
Replies
0
Views
216
Replies
0
Views
242
Replies
5
Views
565
Recommended threads
Replies
2
Views
5,431
Replies
0
Views
2,650
Replies
5
Views
3,290
Replies
3
Views
2,728

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top