Change next word style via css

-1

I was given a banner to do in the layout of a website and would like to know if I could reproduce the effect via css.

For example I have the phrase - > Hello, I'm a text.
I would like to always leave the last word of the text bold. Is it possible to do this with css? If not what would be the best way?

    
asked by anonymous 28.12.2017 / 17:27

1 answer

0

Of course it is possible there are several ways for this, I will post some:

using the B tag, for example your html text - > <h1> meu texto <b>aqui!</b></h1> the text here! will be in bold

But as a good practice the ideal is to use css creating a class:

The "font-weight" property, which is the "bold".

Bold equates to our famous tag, to simply negritar a passage. The syntax is:

font-weight: bold;

Bold is basically meant to highlight an excerpt from a text. For example, to make the following sentence bold:

"CSS is a really important style language for creating websites."

We can use the following code snippet, directly in the tag:

"CSS is a language of style <span style="font-weight: bold">realmente</span> important in creating websites."

Or creating a class in css and then assigning it to an element

.negrito {
 font-weight: bold;
}

<span class='negrito'>oi</span>
    
28.12.2017 / 17:33