HTML Dog
Skip to navigation

First-paragraph drop caps

Targeting the first letter of the first paragraph.

HTML

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Drop caps 3</title>
	<style>
		body {
			font: 15px/2 arial, helvetica, sans-serif;
		}
		p:first-of-type:first-letter {
			float: left;
			font-size: 45px;
			line-height: 1;
			font-weight: bold;
			margin-right: 9px;
		}
	</style>
</head>
<body>
	<p>Once upon a time in a blueberry bubblegum land covered in pink violets that swayed to the rhythm of "My Baby Just Cares for Me" there lived a podgy yet attractive raspberry fairy called Bedooda.</p>
	<p>Bedooda was as tall as a button bush and as intelligent as a peach mystic from the Unscented Hills (not the Scented Hills - the mystics there were not too bright) and was an adored member of the raspberry family but she was an unhappy raspberry fairy. As unhappy as a lost sunfish from the Sweet Spaghetti River.</p>
	<p>The End.</p>

	<!-- Link back to HTML Dog: -->
	<p><a href="http://www.htmldog.com/examples/"><img src="http://www.htmldog.com/badge1.gif" alt="HTML Dog"></a></p>
</body>
</html>

Output

View original