[HTML] Font Colour Help

Super-Supra

(Banned)
4,111
I'm working on a site for a friend.

and the background is black. and im not exactly sure what im soppuse to use so that the FONT COLOUR is WHITE:(

Help would be apreciated
 
Are you look for what font colors are what? #FFFFFF, #FFGG22 for example?

The Hex color for white is #FFFFFF
 
Allow me please to interject a question that will help pinpoint exactly what you should do:

Does this website you're talking about have a CSS, or no? (And if not, are you planning on adding one?) And are you concerned at all about W3C compliance?
 
Originally posted by Super-Supra
I Dont even know what you meant by CSS.
Cascading Style Sheets... they're the new way to format and layout webpages. :)

This might be more than you want to listen to, but anyway:

Way back when, HTML was designed to be easy for anybody to do... if you wanted to change a text's color (listen up! ;)), you'd do something logical, like:

<font color="CCFFFF">This is colored text! Yay!</font>

... and thus anybody could easily put a webpage together.

However, as webpages started getting bigger and more complicated, and as designers wanted to refine or even totally remake the design of their pages (been there, done that), there came a point when doing that stuff was a pain in the you-know-where. It was difficult to update-- Can you imagine having a company website compiled of 50 or so webpages, and suddenly your boss wanted all of the headers to be navy blue and 18px instead of red and 16px? That would be a royal pain in the... yeah.

So, someone really smart developed the idea of a Style Sheet, one central document that gets "attached" to every single page on the website.

As an example, we can look at GTPlanet... you'll notice if you look at the source code that near the top is the following snippet:

<link href="/style.css" rel="stylesheet" type="text/css">

The bold text indicates the style sheet and it's relative position (if you don't know what relative positioning is, I'll save that for another lesson). Anyway, using that bit of information, we can easily find GTP's style sheet right here.

This is where all of the data for GTP's font colors, font sizes, table backgrounds, all of that good stuff is located.

Now that you have a general idea of what a Style Sheet is, I'll leave it up to you to research it (it's just as easy as HTML, trust me). ;)
 
I might also note that if you are going to use an external CSS style sheet, you will need to add a class to your text.

You have your basic style sheet here:
Code:
[b].text[/b] {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10pt;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	color: #000000;
	text-decoration: none;
}
Where .text is the class. The class is just something to help the browser identify which section of the style sheet to use.

So, we have our CSS style sheet with our class. Now to change our text to Verdana, 10pt and black we add the following to our text.

Code:
<p [b]class="[color=green].text[/color]"[/b]">Text goes here.</p>
 
Originally posted by Shannon
Code:
<p [b]class="[color=green].text[/color]"[/b]">Text goes here.</p>
Um, Shannon, that should be class="text", not ".text" ;) The period is used in the CSS as a shorthand to indicate a class property, but in your HTML, you don't actually put the period. Ditto for ID... you put the hashmark (#) in the CSS, but write out id="text" in the HTML.

Also, I didn't touch on classes and IDs, because it's such an integral part to CSS that I wanted him to research it himself, because just giving a short synopsis might be a bit, you know, dillusional. It's important to read up on everything rather than going just by what people say on a forum.

At any rate, I recommend Elizabeth Castro's HTML for the World Wide Web, 5th Edition, with XHTML and CSS... best reference book I have every bought, and I know it has helped out others, like Pako. 👍
 
RRGGBB lowest value is 0,then highest numerical is 9, then letter A is next, and F is the highest value.

P.S. Your little source code there had an extra " in it as well as the extra .
 
Originally posted by Sage
Um, Shannon, that should be class="text", not ".text" ;) The period is used in the CSS as a shorthand to indicate a class property, but in your HTML, you don't actually put the period. Ditto for ID... you put the hashmark (#) in the CSS, but write out id="text" in the HTML.

Also, I didn't touch on classes and IDs, because it's such an integral part to CSS that I wanted him to research it himself, because just giving a short synopsis might be a bit, you know, dillusional. It's important to read up on everything rather than going just by what people say on a forum.

At any rate, I recommend Elizabeth Castro's HTML for the World Wide Web, 5th Edition, with XHTML and CSS... best reference book I have every bought, and I know it has helped out others, like Pako. 👍
Whoops. Yeah, I know you don't but the fullstop (period) in the class attribute. I just copied and pasted that .text part in and forgot to remove the fullstop.
 
Back