<!DOCTYPE html>
<html>
<head>
<style>
#style1 {
background-color: yellow;
color:green;
}
#style2 {
background-color: blue;
color:red;
}
#style3 {
background-color: purple;
color:pink;
}
</style>
</head>
<body>
<div id="out"><span id="text1"><span id="style1">One</span> two three</span></div>
<div id="scoped"><span id="text2">four <span id="style2">five</span> six</span></div>
<span id="text3">seven eight nine</span>
</body>
</html>