Using span to highlight
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>Chapter 2</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style>
body {
font: 1em Verdana, Geneva, Arial, Helvetica, sans-serif;
}
h1 {
font: 1.6em Verdana, Geneva, Arial, Helvetica, sans-serif;
padding: 0.2em;
}
.hilite {
background-color: #FFFFCC;
color: #B22222;
}
</style>
</head>
<body>
<h1>Heading</h1>
<p>These <span class="hilite">stuffed peppers</span> This is a test. This is a test. a buffet and even children seem to like them.</p>
</body>
</html>
Related examples in the same category