Is it possible? I want to change the style of some words in a paragraph with the help of css without using any html tag on those specific word. like , etc. Waiting for posi
without Tags it is not possible. even Jquery can not understand that what you want to change.
No, it's not possible with pure css but there some pseudo-elements which have limited scope like
:first-letter
, :first-line
CSS can select only elements and pseudo-elements. You cannot select words.
Not possibble with only CSS, but with for example jQuery you can search some words into a text and change the style for example:
$('p').html(html.replace(/world/gi, '<strong>$&</strong>'));
Not possible with only CSS. But you could use JavaScript to match specific words and dynamically wrap the words in an HTML element (e.g. a span
), and style that with CSS.