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

CSS CSS Foundations Getting Started with CSS Adding CSS to a Page

E C
E C
692 Points

<style type="text/css"> Is this the only type used with Internal Styles?

I am a bit confused as to the purpose of "text/css". It is noted that it was the type used in conjunction with the <style> tag. However is this the only type ever used? When creating Inline styles should I always default to "text/css" or are there other types as well? I was hoping there would be more of an explanation as to why this particular type was entered into the style tag. Thanks in advance for you assistance. (-_0)

1 Answer

There are other types of styling, C++, CSS3 and SASS, plus there are other languages that you would use in combination with your html like Java, I would imagine those could all be done internally like CSS. I haven't worked much with any of these yet so I'm not 100% certain but in any case it's important to always have clear syntax so that you work can be easily read by others and so that you don't have any errors with your cite. By clearly stating that your style type is text/CSS in addition to selecting your code language/style type you're also keeping you work clear and understandable.