CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <style> body>h1,h2{ font-family: 'calibri', Sans-serif; font-size: 2rem; margin: 0; background: #333; color: #fff; text-align: center; padding: 1rem; box-shadow: 0 0 3px 0 #333; } body div { background: #f8f9fa; padding: 20px; } body div:before { content: 'Font : ' attr(class); background: #333; padding: 2px 10px; display: block; font-weight: bold; margin-bottom: 10px; width: fit-content; color: #fff; font-size: 18px; font-weight: 100; font-family: 'calibri', sans-serif; border-bottom: 2px solid currentcolor; } .times-new-roman { font-family: "Times New Roman", serif; } </style> </head> <body> <h1>CSS Web Safe Fonts Example</h1> <h2>(serif)</h2> <div class="times-new-roman"> <h1>Eget egestas purus viverra accumsan.</h1> <p>Felis eget velit aliquet sagittis id. Euismod lacinia at quis risus sed vulputate.</p> <p>0 1 2 3 4 5 6 7 8 9</p> </div> </body> </html>