[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

add colors in html

Posted on 2011-02-25
9
Medium Priority
?
327 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 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
Technology Partners: 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 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

867 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