?
Solved

add colors in html

Posted on 2011-02-25
9
Medium Priority
?
306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 14

Accepted Solution

by:
athomsfere earned 400 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 800 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Assisted Solution

by:tahula2
tahula2 earned 800 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 800 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 800 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

801 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