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 trialChalin Russell
1,129 Pointswhy is this written like its <h1 class="tag name">Hello, Iām Chalin.</h1> and not <h1 class="tag-name">.....</h1>
I dont understand why there is a space between tag and name while naming the class.. Is tag doing something to name? b/c on tutorial .name is used not .tag name
<h1 class="tag name">Hello, Iām Chalin.</h1>
1 Answer
Osaro Igbinovia
Full Stack JavaScript Techdegree Student 15,928 PointsHi Chalin, the class has two separate names: 'tag' and 'name' because each of those classes are used for specific styling in the CSS stylesheet. Developers do this often in order not to repeat similar CSS properties in different CSS rules when you can put all the styles in a single CSS rule with a particular class then add that class to the HTML elements you want to apply those styles on. At the end of the day it makes the stylesheet more concise and easier to read.