Font variant in HTML and CSS- Tryit Editor for Web Developers
Edit This Code:
See Result »
<html> <head> <style> body { background-color: lightgray; } p.r { text-align: center; color: red; font-size: 40px; font-variant: normal; } p.j { text-align: center; color: purple; font-size: 30px; font-variant: small-caps; } p.b { text-align: center; color: blue; font-size: 20px; font-variant: small-caps; } h1 { text-align: center; font-size: 50px; } </style> </head> <body> <h1>Font Variants</h1> <p class="r">My Name is Robert</p> <p class="j">My Name is James</p> <p class="b">My Name is Brown</p> <br><br> <img src="logo.jpg"/> </body> </html>
Result: