0

Is it possible to combine html and css in one document? If yes then how

Css

3rd Sep 2019, 9:26 AM
Kobby
4 Respostas
0
Yes, you can. Basically there are 2 ways: #1: put your css code inside of <style></style> tag in the head section of your html document. Ex: <style> body{color:red; width:100%;} </style> #2: write your css code inside style attribute of the opening tag of html element. Ex: <div style="background:green; position:relative;"></div>. Hope that help!
3rd Sep 2019, 9:55 AM
Thống Nguyễn
Thống Nguyễn - avatar
+ 8
Yes of course you can use the <style> element or style attribute. But it is recommended to put it in separate file
9th Sep 2019, 4:09 PM
MCGAmedCoder gamerArtist
MCGAmedCoder gamerArtist - avatar
+ 1
Inline, embedded, , external - all 3 are explained here https://www.sololearn.com/learn/CSS/1079/?ref=app
3rd Sep 2019, 9:49 AM
HNNX 🐿
HNNX 🐿 - avatar
3rd Sep 2019, 9:56 AM
Thống Nguyễn
Thống Nguyễn - avatar