Juanid Farooq Juanid Farooq - 1 year ago 160
CSS Question

Color the First word of Sentence CSS

I was trying to color just first WORD of sentence

<div class="logoS">Title Of The Page</div>

CSS which am using is

padding: 0px;
float: left;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
color: white;
border:solid 1px black;
font-weight: bold;
font-size: 22px;

.logoS::nth-word(1) {
margin-right: 20px;

i just want to color "TITLE" not other words, any solution

Answer Source

Try this, hope this will help .

.logoS:before {
  color: red;
  content: "Title ";
<div class="logoS">Of The Page</div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download