Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Beginning HTML and CSS Write a CSS Selector and Property

Style tag

what is a style tag? My program worked but I keep getting the message "Bummer! Don't forget your Style Tag? Help?

Hi Joel,

Post your html code that you used and someone can help you with where you might have went wrong.

This thread shows you how to post code properly in the forums: https://teamtreehouse.com/forum/posting-code-to-the-forum

Thank you all for the help. My problem was I eliminated the <body> line. So when I started the verse with just the <style></style> line and went through the programming I kept getting the error message I talked about. Again thanks for the help, I think I understand now!

2 Answers

Peter Ramsing
Peter Ramsing
16,814 Points

The style tag is what enables you to write css within your HTML file. Try this:

<body>
  <style></style>

  <h1>Nick Pettit</h1>
</body>

Peter Ramsing answered your question greatly. But I'd like to add a bit more to it. Style is an attribute that almost every HTML element and tag accept.

Style attribute accepts styling properties and its value.

For example

<p style="font-size: 24px;">
     Welcome to Treehouse
</p>

In the above example, p is a paragraph element that takes style attribute with a property and value. Style property is a font-size and its value is 24px.

In general, style can have as many properties as possible.

I hope it helps.

Thanks,

Karthikeyan

Shawn Flanigan
Shawn Flanigan
Courses Plus Student 15,815 Points

True, but for the purposes of this code challenge, you'll need a standalone style tag (<style></style>) like Peter showed above.

Alright. It got it. So that, you can write down all css styling inside rather having separate CSS file.