This forum is now read-only. Please use our new forums! Go to forums
Why it's doesn't work , 9/16
Hi , I spend a lot of my time in this page i don’t know what’s is the problem , Pleas chack the code .
<!DOCTYPE html>
<html>
<head>
<title><h1 style="color: green; font-size:16px">Ch</h1></title>
</head>
<body>
<h1>Big Heading</h1>
<p style="color: violet"></p>A giant bear and a little duck were friends.</p>
<p style="color: red"></p>But the bear got hungry and ate the duck.</p>
</body>
</html>
#Regards
Answer 54a31532e39efe349801751f
Here is what I put and the correct code:
<!DOCTYPE html>
<html>
<head>
<title style="font-size: 16px"> Changing the colors!</title>
</head>
<body>
<h1 style="font-size: 16px; color: green"> Big Heading</h1>
<p style="color: violet"> A giant bear and a little duck were friends.</p>
<p style="color: red; font-size: 10px">But the bear got hungry and ate the duck.</p>
</body>
</html>
I also noticed that you didn’t put delimiters (which are the ;/semi-colon sign from CSS styling), make sure to put them in after you put the color’s name. After styling a paragraph, make sure to not put a closing tag after the opening tag instead put it at the end of the content so like this:
<p style = "cursor: crosshair; color: red;">This is an example. </p>
Good luck, and make sure to ask more questions if you need help!
Answer 54a3da729113cb2c1d018b88
right, style is just an attribute, you can apply to many html elements. this:
<title><h1 style="color: green; font-size:16px">Ch</h1></title>
is not good.
<h1></h1>
should be used inside the body tags, not head tags. the styling of <title>
is pointless since it shows up in the tab, where it will not be affected by styling like you just did, so that should just be:
<title>Ch</title>
you didn’t apply style to <h1>
don’t know if that is needed, since your question is in the wrong section.
you added an extra set of closing paragraphs:
<p style="color: violet"></p>A giant bear and a little duck were friends.</p>
so, this means the bit that is styled is:
<p style="color: violet"><!-- any text that would be here --></p>A giant bear and a little duck were friends. <!-- this will not be styled --></p>
so remove the additional closing paragraphs in both paragraphs, and you should be good to go.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
4 comments
Thanks a lot :) i get it well
You’re welcome.
Make sure to mark it as best answer.
this is not a best answer, please don’t. it is just an answer + there are already so many best answers