FAQ: CSS Typography - Text Transformation

This community-built FAQ covers the “Text Transformation” exercise from the lesson “CSS Typography”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn CSS

FAQs on the exercise Text Transformation

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

The lesson states:

It would also avoid uppercase text in the HTML file, which could make code difficult to read.

Does this mean it’s best practice for the entire HTML file to be written in lowercase?

Does this affect the type of text you are using? If you are using a text format that types in all caps will it lowercase them?

When writing my HTML, I use the correct grammar rules. I don’t mean I use full stops and commas all the time, I mean that I write the first letter in my element in capital and the rest in lowercase. I feel like this makes it more readable. Then, in CSS, I can style it all I want using the text-transform property

1 Like

CSS Text Transformation can have three values.

uppercase
lowercase
capitalize

The given example is enough to understand and proceed.

<!DOCTYPE html>
<html>
<head>
<style>
p.uppercase {
  text-transform: uppercase;
}

p.lowercase {
  text-transform: lowercase;
}

p.capitalize {
  text-transform: capitalize;
}
</style>
</head>
<body>

<p class="uppercase">This is some text.</p>
  <p class="lowercase">This is some text.</p>
<p class="capitalize">This is some text.</p>

</body>
</html>

1 Like