Answer to…

How do I highlight one sentence in a page?

Answer by Timothy Foster
rating: +1+x

This is very simple: If you wish to change the style of a sentence you can do this with the [[span]][[/span]] container everything inside there will have the defined style, the rest (content outside) will have the normal style… so it's for making exceptions on the normal style.

Good practice: If you are planning to use one exception like (highlighting text for example) you'd better make a class for this. Imagine you change your mind and the highlighting color should not be yellow but pink… you need to change all your pages if you not work with a new class. It should be a class (not an id) because this exception can appear more than once on a page.

So knowing this, simplest way (only once, not many times) is the inline style:

[[span style="background-color:yellow;"]]This is your highlighted text[[/span]]

This is your highlighted text

If you add that styling to your CSS theme as a class, you can do something like this instead:

[[span class="highlight"]]This is your highlighted text[[/span]]

This is your highlighted text

This is not a <HTML>-CSS reference base. For that we direct you to other excellent places on the web: CSS-tutorials via Google

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License