Solved

add colors in html

Posted on 2011-02-25
9
293 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 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
Independent Software Vendors: 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!

 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SVG and IE11 2 33
How do I Enable submit button only if listbox has items 4 63
HTML editor custom button 3 84
Save data in two Database, Asp 2 68
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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 Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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)

737 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