HTML Academy
The font-style property, italics
Typography17/20
Back to the list of tasks
  • 1. The font-size property
  • 2. Relative font size
  • 3. The line-height property
  • 4. Relative line height
  • 5. The font-family property
  • 6. The font-weight property
  • 7. The text-align property, horizontal text alignment
  • 8. The text-align property does more than just align text
  • 9. The vertical-align property, vertical text alignment
  • 10. Use of the background in typography
  • 11. The color property, text color
  • 12. Using margins to format the text
  • 13. The white-space property, space management
  • 14. Assignment of styles to preformatted text
  • 15. The text-decoration property, underlining as well as other effects
  • 16. The font-style property, italics
  • 17. The text-transform property, character case
  • 18. Shave space off the footer
  • 19. Summary of “Typography”
  • 20. Test: Designing an article
Shave space off the footer
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

The text-transform property, character case

You can also use CSS to control the case of characters: you can make letters lowercase (small) or uppercase (large). This is done using the text-transform property. It can take the following values:

  • lowercase — It formats everything as lowercase;
  • uppercase — It formats everything as uppercase;
  • capitalize — Every word starts with a capital letter;
  • none — It cancels any change to the case.

Why would you change the case of some text using text-transform: uppercase rather than just having it in all capitals in the HTML? Words spelled in ALL CAPITALS are often spelled out by some screen reader software used by blind people, which assumes that they represent an acronym (such as HTML, CSS etc). Converting them with CSS to uppercase doesn’t cause this behaviour in screen readers.

Without further ado – let’s start practicing!

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>The website of a beginning coder</title> <link rel="stylesheet" href="style.css"> </head> <body> <header> <p class="page-title">Blog</p> <nav class="blog-navigation"> <a href="index.html">Return to home</a> </nav> </header> <main> <article> <h1>Still Day Seven. Muffin gave me an assignment</h1> <p>Today Muffin came and gave me a bit of an unusual assignment. A certain female cat has moved in next door, and Muffin does not know how to write songs. Therefore, he asked me to find some sort of great composition that he could perform for her.</p> <p>Like they say, <q>there is no time like the present</q> (<cite>popular wisdom</cite>).</p> <p>I found a lyrical ballad for Muffin:</p> <blockquote> <p> Meow meow meow <br> meahh meow meeeow <br> meow meow <br> meow </p> <cite>from the Collected Works of W. Furspeare.</cite> </blockquote> </article> <aside class="partnership"> Your ad could go here </aside> </main> <footer> Website footer </footer> </body> </html>
CSS
body { padding: 0 30px; font-size: 16px; line-height: 26px; font-family: "Arial", sans-serif; color: #222222; background: #ffffff url("img/bg-page.png") no-repeat top center; } h1 { font-size: 24px; line-height: normal; } h2 { font-size: 20px; line-height: normal; } a { color: #0099ef; text-decoration: underline; } del, ins { text-decoration: none; } del { color: #ff4400; } ins { color: rgb(105, 178, 83); } pre, code { font-family: "Courier New", "Courier", monospace; color: #3632ad; background-color: #fafaff; border: 1px solid #c6c4f4; border-radius: 4px; } pre { padding: 5px; } code { padding: 2px 5px; } pre code { background-color: transparent; border: none; border-radius: 0; } .page-title { font-weight: bold; font-size: 36px; line-height: 42px; font-family: "Verdana", sans-serif; text-align: center; } .avatar-container { text-align: center; } .avatar { border-radius: 50%; } .blog-navigation { margin-bottom: 30px; padding: 20px; color: #ffffff; background-color: #4470c4; border: 5px solid #2d508f; } .blog-navigation h2 { margin-top: 0; } .blog-navigation ul { padding-left: 0; list-style: none; } .blog-navigation li { margin-bottom: 5px; } .blog-navigation a { color: #ffffff; } .skills dd { margin: 0; margin-bottom: 10px; background-color: #e8e8e8; } .skills-level { font-size: 12px; text-align: center; color: #ffffff; background-color: #4470c4; } .skills-level-ok { background-color: #47bb52; } .partnership { margin: 30px 0; padding: 30px; text-align: center; color: #ffffff; background-color: #4a87fa; background-image: url("img/bg-partnership.svg"); } footer { margin-top: 30px; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. For the h1 heading make all of the letters that have been assigned the text-transform property lowercase by setting the value to lowercase,
    2. But set uppercase as the value for the partnership class to capitalize all of the letters,
    3. And for blockquote p set the value to capitalize to set the title case for all of the words within the paragraph.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.