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 CSS: Cascading Style Sheets Style the Basic Elements

Check the text- align value in your css?

it says Check the text-align value in your CSS. Select the element with the ID logo and center the text using text-align. how do I do it. I dont recall him showin\ming me in the video. Please help?

2 Answers

Hey Jasmine! Not sure what lesson you are working on, but that's okay... I think I got you!

Most commonly, HTML elements are styled in CSS using id tags. All that one has to do is include an id in the HTML code, and reference that in the CSS. (See example below.)

If you want to change the appearance of the p element, add an id...

<p id=frankie>Hello!</p>

Then reference that id in the CSS. (Please note the hashtag.)

#frankie {
     text-align: center;
}

Hope this answers your question. Keep up the good work!!

To select an element with an ID in CSS you would use the # symbol.

#logo {text-align: center}

I hope this helps.