+ 1
where to write css coding in html?? text
where did i have to write a css coding in head or body file anyone please give me a example
7 Answers
+ 5
Best option: in a separate *.css file.
Second option: inside the head section.
Last option: inline. only if you really really have to.
+ 5
After you have created a separate css file, put this code in the head section (<head></head>):
<link rel="stylesheet" href="style.css">
Assuming you named it 'style.css'.
0
zinc how the separate css file will came to know that, that .css file is for which html
0
In html file you write coding in head
0
in the head tag
0
1) you can write css codes in the head by using <style></style>property {internal style sheet}
2) you can write css codes in the body by write style and the propertys in the same html code,for example :
<p style="color:gray;">This is pargraph</p>{inline style sheet}
3) you can write css codes in the external file by write the link property in the head [<link rel='stylesheet" href="style.css"></link>{ External stylesheet}.
thanks
- 3
Brackets