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 How to Make a Website Adding Pages to a Website Style New Pages

Thiago Reis
Thiago Reis
2,247 Points

How do I color only my word to an external page (twitter)?

For example: follow me AAA.

How would I color only the AAA?

2 Answers

Michael Hulet
Michael Hulet
47,912 Points

Here's one solution:

index.html
<a href="https://www.twitter.com/yourusername" class="twitter-link">AAA</a>
style.css
.twitter-link{
    color: #55acee; /*This is actual Twitter Blue according to their Branding & Asset Guidelines, if you wanna use that */
}

You could wrap it in a span tag. It's an inline element so it won't break the line. Then you could style it with a css selector that is specificly targeting the span element.

Such as. HTML:

<h1>follow me <span>AAA</span></h1>

CSS:

h1 span {
color: firebrick;
}