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

Using "tag x" instead of just "x" for HTML->CSS?

So perhaps its just a matter of personal preference. I was wondering why, in the Introduction to HTML and CSS course, we bother using "tag" and then the name designation for the attribute, instead of just giving it a name. I don't see this practice repeated in W3, is it just a way to better help new users visualise the relationship between CSS and HTML, or does it serve some other purpose?

EDIT: As a follow-up question, looking at the CSS, why is the header rule repeated twice? e.g.

header {
    text-align: center;
    background: url('images/portland.jpg') no-repeat top center ;
    background-size: cover;
    overflow: hidden;
    padding-top: 60px;
}
header {
    line-height: 1.5;
}

1 Answer

Steven Parker
Steven Parker
229,644 Points

I'd guess that the word "tag" is just used to represent where an actual tag name might go in a generic HTML start tag, and not that the word "tag" itself would ever be used. If you believe it was something else, can you provide a link and a video time reference for where you saw it?

And repeating the rule isn't necessary. You could place the new property and value in the original rule and it would do the same thing.