Languages
[Edit]
EN

CSS - how to make first letter of string uppercase?

9 points
Created by:
Root-ssh
6417

Using CSS it is possible to capitalize letters in following way.

1. test-transform style example

// ONLINE-RUNNER:browser;

<!doctype html>
<html lang="en">
<head>
  <style>

    p.capitalize::first-letter {
        text-transform: capitalize;
    }

  </style>
</head>
<body>
  <p class="capitalize">this text has been written with small letters only...</p>
</body>
</html>

 

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.