+ 2
Anyone tell me please.Is this a CSS style code or a html code?
https://www.w3schools.com/code/tryit.asp?filename=GGNE2P5XFWXS
10 Respuestas
0
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
.city{
background-color: tomato;
color: white;
padding: 10px;
}
</style>
</head>
<body>
<h2>The class Attribute</h2>
<p>Use CSS to style elements with the class name "city":</p>
<h2 class="city">London</h2>
<p>London is the capital of England.</p>
<h2 class="city">Paris</h2>
<p>Paris is the capital of France.</p>
<h2 class="city">Tokyo</h2>
<p>Tokyo is the capital of Japan.</p>
</body>
</html>
This is for you
+ 1
Ok.I have copied a code from internet. but it is not showing properly.Please solve this matter too I will be really grateful to you guys.
https://code.sololearn.com/WfTGwlw70ZHw/?ref=app
+ 1
F҉R҉O҉N҉T҉ 🔚& 🔙🔚/ 𝔸𝕣𝕕𝕦𝕚𝕟𝕠 Lover Brother I already tried in html but same results.No color is displaying😰
https://code.sololearn.com/W6wGbxj2Wo15/?ref=app
+ 1
Thank you very much💜But I am still confused what did I wrong🙈F҉R҉O҉N҉T҉ 🔚& 🔙🔚/ 𝔸𝕣𝕕𝕦𝕚𝕟𝕠 Lover
+ 1
Oh Okay.Thank you brother💜
0
It's not mandatory that if any file is with .html extension then there is only html we can use css inside style tag and javascript inside script tag. It will also work fine.
and here in html a css is used by script tag
0
Ops Riyad Rahman I told you that you can use css and javascript both in html not html in css or javascript
0
I to confused dear
It seems like there is some bug. I just rewritten your code with proper indentation. But in html indentation doesn't matter
0
You used an inline method style sheet (css)to create the style for your HTML code
0
Both html code with internally embaded CSS style code.
As we know that we can include CSS in html in 3way:-
1) externally
2) internally
3) inline