What is the point of text-transform: capitalize?

If all it does is capitalize the first letter of every word, can’t this be done when typing in the raw text in HTML? For example, instead of having this:

index.html
< h1 class=“title” >codecademy forums</ h1>

style.css

.title {
text-transform: capitalize;
}

Couldn’t you just have written it as “Codecademy Forums” in the first place?

2 Likes

True, its possible. But what if the content is generated by the user? Like this forum? Twitter? facebook? You name it

then its nice you can control with css what the site will look like

3 Likes

To be even more pedantic - Once there are more elements transformed than the length of keys it took to type
text-transform: capitalize;
I’d be saving time by leaving everything lowercase

That of course would be an incredibly small amount of time and that is a very silly example @stetim94 gives a very practical example. You aren’t always the one who named these things. Very frequently you will be dealing with someone else’s input or code

1 Like