+ 20
Why this code does not work properly?
17 Réponses
+ 9
If you did want to put styling on the html side then make sure you wrap it in its correct style tags.
<style type="text/css">
...
</style>
+ 7
you need to put the following code in <style> element, like this:
<style>
p {
color:white;
background-color:gray;
}
</style>
+ 6
Remove the styling from the Html section and then remove the html from the css section and it works fine,
HTML
<head>
<link rel="stylesheet" href="example.css">
</head>
<body>
<p>This is my first paragraph.</p>
<p>This is my second paragraph. </p>
<p>This is my third paragraph. </p>
</body>
CSS
p {
color:white;
background-color:gray;
}
+ 5
In HTML :
<head>
<link rel="stylesheet" href="example.css">
</head>
<body>
<p>This is my first paragraph.</p>
<p>This is my second paragraph. </p>
<p>This is my third paragraph. </p>
</body>
--------------------------------------------------
In CSS :
p {
color:white;
background-color:gray;
}
---------------------------------------------------
Correct your code. it will work perfectly.
+ 5
put d p styling code in style tag.
+ 3
second formula
https://code.sololearn.com/W05s31lKl62H/?ref=app
+ 2
ok
+ 1
Clear all the code in css section and the paste the following in it
and also removing the same from html section:
p {
color: white;
background-color: gray;
}
+ 1
you are using html use css
0
You need to put the code in style tags for the style features with the p.
0
If you did want to put styling on the html side then make sure you wrap it in its correct style tags.
<style type="text/css">
...
</style>
0
Why r u using html tags in css
0
First of all:you need to remove any CSS tags or code you have written in the HTML file or section,
Secondly:remove all the HTML tags from the CSS section.
After all these steps the code will work fine 🙂
0
ok
0
p {
color:white;
background-color:gray;
}
put this in external css file example.css
or in <style> tag
<style>
p {
color:white;
background-color:gray;
}
</style>
0
are you slove this problem?