I have a paragraph with some text in it. How do I change the color of just one word w/in that paragraph? My attempt at it ends up changing the color of ‘is’ but also puts ‘is’ on it’s own line.
<div class="myHeader">
<h1>This is my heading</h1>
<h2>This <div class="test">is</div> the paragraph</h2>
</div>
css file:
.myHeader {
text-align: center;
font: normal Helvetica, Arial, sans-serif;
color: #ffffff;
}
.test{
color: red;
}
Instead of having
.testbe adiv, use something likespan.It’s getting it’s own line because
divis a block element, whilespanand the like are inline.