Solved

add colors in html

Posted on 2011-02-25
9
274 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now