Search code examples
htmlcssstylesheet

HTML + CSS Styles/Text Formatting inside Div container


I'm trying to bold and color certain words (or make them italic, different size, etc.) within a paragraph in my Index.HTML.

But the usual formatting tags (HTML) are not working.

I have a StyleSheet that contains all of my styles and properties for the website, but I only want to change three words (for example) in the paragraph. How do I do it?

index.html:

<div id="da-slider" class="da-slider">
    <div class="da-slide">
        <h2>This is the Heading</h2>
        <p>And HERE is where I want to make this word BOLD and this WORD in a different color, for example</p>
        <a href="#" class="da-link">Read more</a>
    <div class="da-img"><img src="img/pp-slider/imac.png" alt="image01" /></div>
</div>

Solution

  • check this fiddle: here

    This is a little example.

    I use <strong>Word</strong> to make it bold, but <b>Word</b> will do fine to.

    use <i></i> to make words italic. Also i used <span class="color">Word</span> to make it blue.