www.netcreator.us
NETCreator - News, Scripts, Hosting, CMS, Tutorials

Webmaster Forum

Now, you don't need to wait so much with your question.

Home     |     Ask a Question

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.
in Programming HTML
asked by ross

Discussions (1)

Yes, it is possible.

Method 1

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.

Method 2

You can add your css code directly in your HTML file

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

Method 3

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

<div>My text...</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.
by NETCreator

Reply to this question

Please Login to Reply
SEARCH QUESTIONS & ANSWERS
ASK A QUESTION