HomeLatest ThreadsGreatest ThreadsForums & GroupsMy SubscriptionsMy Posts
DU Home » Latest Threads » Forums & Groups » Main » Community Help (Forum) » HTML text color codes and...

Fri Sep 14, 2012, 11:29 PM


HTML text color codes and DU.

Ok, I've looked for the answer to my question a bit and I'm just not finding the help I desire. I would love to add some color to some text here on DU.

I know there are html codes to add before/after text to change it's color similar to the {b}---{/b}, but I just can't seem to make it work.

Thanks for any help in advance!

4 replies, 3030 views

Reply to this thread

Back to top Alert abuse

Always highlight: 10 newest replies | Replies posted after I mark a forum
Replies to this discussion thread
Arrow 4 replies Author Time Post
Reply HTML text color codes and DU. (Original post)
obxhead Sep 2012 OP
Make7 Sep 2012 #1
obxhead Sep 2012 #2
Make7 Sep 2012 #3
obxhead Sep 2012 #4

Response to obxhead (Original post)

Fri Sep 14, 2012, 11:39 PM

1. Hopefully the following thread answers your question:


Styles work as well if you know CSS, but since there are so many possibilities it is unlikely I will make a table of useful code using styles. You'll need to put them in a [div] tag, the software doesn't allow the use of [span] tags (although I usually use a [font] tag like a [span] tag and it normally works fine).

ETA an example:

[font color="blue"]text here[/font]

Reply to this post

Back to top Alert abuse Link here Permalink

Response to Make7 (Reply #1)

Fri Sep 14, 2012, 11:49 PM

2. Thanks!


I'll be honest, a lot of that reply flew right over my head, but you've given me a
great starting point.

Reply to this post

Back to top Alert abuse Link here Permalink

Response to obxhead (Reply #2)

Sat Sep 15, 2012, 12:31 AM

3. You're on the right track...

... but "face" isn't really a valid value for the face attribute, and 14 isn't within the accepted range for the size.

You added this in the OP:

  [font color="red" size="14" face="face"]Thanks[/font]

The size range is from 1 to 7 (with 3 being normal). The face attribute is for typefaces like Arial, verdana, courier, etc. If you're not trying to change the typeface, just leave the face="" part out.

A great reference for all things web programming is w3schools. Here are more details about the attributes of the font tag: color, size, face.

Also useful on that site are the valid HTML color names and a hex number color picker.

Styles are a more powerful tool for doing many of the same things that can be done with HTML tags. For example of changing the font attribute with styles:

  [div style="display:inline; color:#990000; font-size:1.385em; font-family:courier,monospace;"]
text here

One of the things I use styles for is to make the excerpt boxes more prominent on DU. Like this:

[div class="excerpt" style="margin-left: 2em; border: 1px solid #bfbfbf; border-radius: 0.4615em; box-shadow: 3px 3px 3px #999999;"]text here[/div]

There are plenty of people on this site familiar with this stuff - so if you are trying to do something and it just doesn't work quite right, don't hesitate to ask - usually someone will be around fairly soon that can help.

Reply to this post

Back to top Alert abuse Link here Permalink

Response to Make7 (Reply #3)

Sat Sep 15, 2012, 01:29 AM

4. WOW!


Yeah, I know just enough now to make myself look foolish.

I simply can't thank you enough Make7. You've answered my very basic questions and given me so much more to shoot for.

I bow to the great and powerful.

Reply to this post

Back to top Alert abuse Link here Permalink

Reply to this thread