Currently Empty: ₹0.00
CSS Text Transformation
CSS Text Transformation
Learn how to change the capitalization of text using the CSS text-transform property. Explore uppercase, lowercase, capitalize and none with practical examples and live demonstrations.
📘 What is CSS Text Transformation?
The CSS text-transform property controls the capitalization of text without changing the original text written in HTML.
It is useful when you want headings, buttons, navigation links or labels to appear in a specific capitalization style.
In simple words:
text-transform changes how text is displayed on the screen,
while the original HTML text remains unchanged.
🧩 CSS Text Transform Syntax
selector {
text-transform: value;
}🔑 Text Transform Values
| Value | Purpose | Example Result |
|---|---|---|
none | Uses the normal text capitalization. | Hello world |
uppercase | Converts all letters to uppercase. | HELLO WORLD |
lowercase | Converts all letters to lowercase. | hello world |
capitalize | Capitalizes the first letter of each word. | Hello World |
⚪ Example 1: text-transform: none
The none value displays text normally without
applying a transformation.
.text {
text-transform: none;
}
Hello World From SNCEC
🔠 Example 2: Uppercase
Use uppercase to display all letters in
capital form.
.heading {
text-transform: uppercase;
}
welcome to shree narayan computers
🔡 Example 3: Lowercase
Use lowercase to display all letters in
lowercase.
.text {
text-transform: lowercase;
}
WELCOME TO SHREE NARAYAN COMPUTERS
🔤 Example 4: Capitalize
The capitalize value changes the first
letter of each word to uppercase.
.title {
text-transform: capitalize;
}
learn computer skills with practical training
▶️ Live Comparison
The same HTML text can be displayed in different forms by changing only the CSS property.
Original: welcome to sncec
Uppercase: welcome to sncec
LOWERCASE: WELCOME TO SNCEC
capitalize: welcome to sncec
💻 Practical Example: Navigation Menu
Text transformation is commonly used for navigation menus and buttons.
.menu a {
text-transform: uppercase;
}
.menu a:hover {
text-transform: uppercase;
}This allows you to write normal text in HTML while displaying
navigation labels consistently in uppercase.
🔘 Practical Example: Button Text
.button {
text-transform: uppercase;
font-weight: bold;
}🎯 Text Transformation for Headings
You can use text transformation to maintain a consistent heading style throughout a website.
h2 {
text-transform: capitalize;
}💡 Important Note
CSS text-transform changes the visual presentation
of text. It does not rewrite the actual text stored in your HTML.
Example:
HTML:
CSS:
Display: WELCOME TO SNCEC
HTML:
<h1>welcome to sncec</h1>CSS:
text-transform: uppercase;Display: WELCOME TO SNCEC
💡 Practical Uses
🧭 Navigation
Display menu links consistently in uppercase.
🔘 Buttons
Create consistent button labels.
📢 Headings
Maintain a consistent typography style.
🏷️ Labels
Standardize labels and small interface elements.
⚠️ Common Mistakes
-
Confusing
capitalizewithuppercase. - Using uppercase text everywhere, which can reduce readability.
- Forgetting that text-transform changes display, not the original HTML text.
- Using inconsistent transformations across navigation elements.
Design Tip:
Use uppercase mainly for short labels, navigation items,
buttons and headings. Avoid large blocks of uppercase text.
📝 Practice Exercises
Try these exercises in your HTML Runner:
- Create a heading and convert it to uppercase.
- Convert uppercase text to lowercase.
-
Use
capitalizeon a paragraph. - Create a navigation menu using uppercase text.
- Create an “Enroll Now” button using uppercase text.
-
Compare
none,uppercase,lowercaseandcapitalize.
📚 Quick Reference
| CSS | Purpose | Example |
|---|---|---|
text-transform | Controls text capitalization. | uppercase |
none | Normal text. | hello world |
uppercase | All letters become uppercase. | HELLO WORLD |
lowercase | All letters become lowercase. | hello world |
capitalize | Capitalizes each word. | Hello World |
🎓 Key Points to Remember
- text-transform controls text capitalization.
- uppercase converts letters to uppercase.
- lowercase converts letters to lowercase.
- capitalize capitalizes the first letter of each word.
- none keeps the normal text presentation.
- CSS transformation changes visual presentation without changing the original HTML text.
SNCEC PORTAL
Student & Website Links
Quick access to student services, courses, learning resources and SNCEC information.
Student Login
Access your student account
Student Registration
Create your student account
Student Dashboard
Manage your learning activities
Courses
Explore our job-oriented courses
Instructor Registration
Join us as an instructor
Our Team
Meet our professional team
About Us
Learn more about SNCEC
Contact Us
Get in touch with our team
Mock Tests & Quizzes
Practice and test your knowledge
Student Zone
Access student services and resources
Student Zone →Learning Portal
Access online learning resources
Open Portal →Computer Shop
Computers, accessories & IT products
SNCEC Official Website
Shree Narayan Computers & Education Center



