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
Tom Coomer
1,331 PointsCapitalise first letter in paragraph
How do I capitalise the first letter in paragraph? Should it split the string into an array of objects?
2 Answers
Dai Phong
20,395 Pointsuse p::first-letter to style the first letter in your paragraph
Atanas Sqnkov
14,981 PointsA little more explanation on Dai Phong's answer:
You can capitalize the first letter in your paragraph by using what is called a pseudo-selector.
In Your case, You want to capitalize the first letter of Your paragraph, so by using the ::first-letter for your paragraph, You just have to write it down in Your stylesheet(css) selecting all paragraphs or a single one by applying either an ID or a Class to it.
For example, lets say this is your styles.css file:
p::first-letter {
font-size: 3em;
font-weight: bold
}
I hope I made it a bit more clear.
P.S> You should change the topic category from iOS to CSS.
Tom Coomer
1,331 PointsThe question is an iOS question. Sorry