+ 5
Having trouble with the Div tag
Whenever I try using the Div tag and try to color something, nothing appears in the output
25 odpowiedzi
+ 5
<!-- Here's the full code -->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div style="background-color: blue;">
<h1>Hello!</h1>
</div>
</body>
</html>
+ 3
try this:
<div style="background-color: blue;"></div>
+ 2
I ment like where I enter the code inside of my html tags, is it my first div line or somewhere in between?
+ 2
on between the body tags, put something like h1 or p tags in <div style="background-color: blue;"></div>, then it works, volia!
+ 2
thing is this is a practically word for word recreation of what sololearn gives you to learn the div code, so idk why its not working
+ 2
You have a typing error "backround" should be "background"
+ 1
where do I enter that code? Im quite new so bare with me
+ 1
Cheesy Boi between body tags
+ 1
for some reason its still not working, its fine I dont wanna waste your time. I still need to practice remembering the div strings
+ 1
I tried it on Code Playground, and it works!
+ 1
Oh ok I will try it out! Thanks
+ 1
here is my string im trying to work
<!DOCTYPE html>
<html
<body>
<h1>Headline</h1>
<div style="backround-color:green; color:white; padding:20px;">
<p> Cheese doesent really taste good</p>
<p> Heh ironic</p>
</div>
</body>
</html>
+ 1
i blame dylexia, i promise I totally dont get Fs in english
+ 1
Cheesy Boi no you simply made a common mistake. - Happy Coding!
+ 1
I think it is supposed to be like this:
<!DOCTYPE html>
<html
<body>
<h1>Headline</h1>
<div style="background-color:green;color:white;padding:20px;">
<p> Cheese doesent really taste good</p>
<p> Heh ironic</p>
</div>
</body>
</html>
DON'T space the letters that are in the "style" attribute.
+ 1
Привет
0
On code playground there is a separate tab to enter your css if you want.
0
Share your code example.
0
oh im dumb
0
hey I figured it out but thanks anyways