Lets say I have an asp.net label that has the value:
Label1.Text = “Hello my name is Robert, the ID value is 20”
and I wanted to apply bold to the name “Robert” and the ID “20”.
And green for his name and red for the value…
I cannot apply a CSS style to the entire Label because it would make every text value a certain style. How can I apply CSS to something like this? I dont want to embed <strong> tags within the label like this:
Label1.Text = "Hello my name is <strong>Robert</strong>..."
You need to mark up the name and the ID in some way.
Example:
CSS