Jump to content
RyanSchurton

How do I change the Style of one word inside of <p> tags

Recommended Posts

I am trying to change the style of one word inside of a whole bunch of words that are all inside of <P></P> tags. Here is an example of what i am trying to do

<p>I go to the mall.i drive fast cars, i get a lot of money. and I travel all around the world.</p>

I want to change the color of (i get a lot of money). give it a background color and a border.

Edited by RyanSchurton

Share this post


Link to post
Share on other sites

use span

<p>I go to the mall.i drive fast cars, <span class="highlight1">i get a lot of money</span>. and I travel all around the world.</p>

.highlight1 {    background-color: red;    border: 2px solid lime;    color: #FFFFFF;    padding: 0 6px;}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...