We're I try css programming In html? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

We're I try css programming In html?

3rd Dec 2016, 2:37 AM
subhjeet bej
subhjeet bej - avatar
5 Answers
+ 2
What do you mean?
3rd Dec 2016, 2:43 AM
Ben
Ben - avatar
+ 2
Oh. If I'm right, you're referring to the style attribute of HTML tags. In these attributes, you essentially act as if the HTML tag you're writing the style for is the selector (except it won't affect all tags of same type). Here's an example. <body style="background-color:red"></body> You can omit the semi colon in the last part.
3rd Dec 2016, 2:48 AM
Ben
Ben - avatar
+ 2
Well, you could also simply include the style tag inside the header and act as if everything between the tags is a CSS file. Here's an example. <head> <style> body { background-color:red; } </style> </head> Now, if you just wanted to link to an entirely separate CSS file, you could use the <link> tag. Here's an example of that. <head> <link rel="stylesheet" href="styles.css"></link> </head> There's no other methods that I'm aware of.
3rd Dec 2016, 2:55 AM
Ben
Ben - avatar
+ 1
Coloring the html front without css any code have
3rd Dec 2016, 2:45 AM
subhjeet bej
subhjeet bej - avatar
0
Do you mean coding CSS in an HTML file ? If so, error.
3rd Dec 2016, 4:28 AM
Ash Ketchum
Ash Ketchum - avatar