Careeroza
Text
Text Properties
| Property | Example values |
|---|---|
color | #333 |
text-align | left, center, right, justify |
text-decoration | none, underline, line-through |
text-transform | uppercase, capitalize |
line-height | 1.6 (unitless is best) |
letter-spacing, word-spacing | 0.05em |
text-shadow | 1px 1px 2px gray |
text-overflow | ellipsis (with overflow:hidden; white-space:nowrap) |
Example
Example
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
body { font-family: Arial, sans-serif; }
.title { text-align: center; text-transform: uppercase; letter-spacing: 0.1em; color: #04AA6D; }
.body { line-height: 1.7; text-align: justify; }
a { text-decoration: none; border-bottom: 2px solid #04AA6D; color: inherit; }
.cut { width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #f1f1f1; }
</style>
</head>
<body>
<h2 class="title">Text styling</h2>
<p class="body">Line height makes paragraphs easier to read. A value around 1.5 to 1.7 is comfortable for body text. Here is <a href="#">a custom link</a>.</p>
<p class="cut">This long sentence is cut off with an ellipsis at the end.</p>
</body>
</html>Result