Solved

add colors in html

Posted on 2011-02-25
9
282 Views
Last Modified: 2012-05-11
Can you suggest the color coding needed to alter the below test code to include colors.

thanks
<H1>FuncCode Report</H1><table border="1"><tr><th>Column1</th><th>Column2</th><th>Column3</th><th>Column4</th><tr><td>1</td><td>text2</td><td>text3</td><td>text4</td></tr><tr><td>2</td><td>code2</td><td>code3</td><td>code4</td></tr></table>

Open in new window

0
Comment
Question by:anushahanna
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 14

Accepted Solution

by:
athomsfere earned 100 total points
ID: 34982940
@anushahanna

I would hope you are using CSS, as this would make everything easy and modern. It can be done with HTML, but CSS is easier, better to manager and make everything look more like site of the 2000s, and less like a personal page from '96.

If you use CSS, and all say h1 are of a certain color then you could do
h1
{
color:#HexColorChoice;
}
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34983115
unfortunately, only html, because sql server has not adapted to css yet.
0
 
LVL 2

Assisted Solution

by:jaxbrian
jaxbrian earned 200 total points
ID: 35047724
<font color="green">Green</font>

you could place something like that before and after each text that you want to change the color of.

is that what you are trying to do? or something more dynamic?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 2

Assisted Solution

by:tahula2
tahula2 earned 200 total points
ID: 35059617
Perhaps inline style?

<span style="color:green;background-color: purple;">Green</span>
or
<h1 style="color:green;">Green</h1>

for example
0
 
LVL 6

Author Comment

by:anushahanna
ID: 35061078
thanks- but I am not positioning it right..

how would you?

<H1>FuncCode Report</H1><table

border="1"><tr><th>Column1</th><th>Column2</th><th>Column3</th><th>Column

4</th><tr><td>1</td><td>text2</td><td>text3</td><td>text4</td></tr><tr><t

d>2</td><td>code2</td><font

color="green">code3</font><td/td><td>code4</td></tr></table>


<H1>FuncCode Report</H1><table 

border="1"><tr><th>Column1</th><th>Column2</th><th>Column3</th><th>Column

4</th><tr><td>1</td><td>text2</td><td>text3</td><td>text4</td></tr><tr><t

d>2</td><td>code2</td><span style="color:green;background-color: 

purple;">code3</span><td/td><td>code4</td></tr></table>

Open in new window

0
 
LVL 2

Expert Comment

by:jaxbrian
ID: 35062602
you have to scoot it over to the next <td> like what I have below

<H1>FuncCode Report</H1><table

border="1"><tr><th>Column1</th><th>Column2</th><th>Column3</th><th>Column

4</th><tr><td>1</td><td>text2</td><td>text3</td><td>text4</td></tr><tr><t

d>2</td><td>code2</td><td><font color="green" size="+2">code3</font></td><td>code4</td></tr></table>
0
 
LVL 2

Assisted Solution

by:jaxbrian
jaxbrian earned 200 total points
ID: 35062611
you do not have to have the size i just did that so it would be bigger when I was looking at your code in my editor
0
 
LVL 2

Assisted Solution

by:tahula2
tahula2 earned 200 total points
ID: 35085179
Please see code below for three different examples of how to use inline styles, each row has a different example of were you could put them.


<H1>FuncCode Report</H1>

<table border="1">
  <tr style="color:green;background-color:purple;">
    <th>Column1</th>
    <th>Column2</th>
    <th>Column3</th>
    <th>Column4</th>
  </tr>
  <tr>
    <td style="color:white;background-color:black;">1</td>
    <td>text2</td>
    <td>text3</td>
    <td>text4</td>
  </tr>
  <tr>
    <td>2</td>
    <td><span style="color:red;background-color:yellow;">code2</span></td>
    <td>code3</td>
    <td>code4</td>
  </tr>
</table>

Open in new window

0
 
LVL 6

Author Comment

by:anushahanna
ID: 35086329
very nice - thanks.!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question