WebTricks
Home
Home
Tutorials
Q&A Forum
Blog
Videos
Sign up / Register
CSS Texts Formatting - Playground
Back to Lesson
HTML Code
<!DOCTYPE html> <html> <head> <title>CSS Texts Formatting</title> <meta charset="UTF-8"> </head> <body> <h1>CSS Text Formatting</h1> <h2>Basic Styles</h2> <p class="basic">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <h2>Styling a Link</h2> <p class="link"><a href="#">This is a link.</a></p> <h2>Vertically Aligning Image within a text block</h2> <p class="align">This is a text with some text vertically aligned <span>as a subscript</span> within the text block.</p> <p class="align2">This is a text with an image <img src="logo-icon.png"> vertically aligned as superscript within the text block.</p> <style> .basic{ color: red; line-height: 1.6em; letter-spacing: 1px; text-align: justify; word-spacing: 5px; } .link a{ text-decoration: none; text-shadow: 0 0 3px red; text-transform: uppercase; } .align span{ vertical-align: sub; } .align2 img{ vertical-align: super; } </style> </body> </html>
CSS Code
/* Write your CSS here */
Run Code