Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Replying to {} Changing Font Color / Size {}


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Posted 28 July 2010 - 04:49 AM

Good to know. I've stopped using the <font> tag and as far as ICan tell deprecated tags since I've been comfining all my html coding to XHTML 1.0 Strict, and I'm know making the switch to XHTML 1.1. So I've been using CSS. I was just worried that CSS would act the same way and cause me problems.


FirefoxRocks

Posted 16 August 2006 - 02:58 PM

Using <font> is not proper HTML 4.01/XHTML 1!
<font> is HTML 3.2, which is quite old.

Use
<span style="color:aqua">Aqua text here</span>

for compatibility with most browsers and standards compliancy.

A whole list of CSS can be found at W3Schools and Web Development Lessons.

nightfox

Posted 06 July 2006 - 02:43 AM

Very nice tutorial for those beginning, but may I point out something? The web is becoming more and more CSS based. It would be nice to see some more CSS tutorials as CSS is more flexible than the font tags.

Back when I was starting, this tutorial would have come in handy! I learned from a book for kids and this girl, Elila or something like that, was building her own website. Hehehe... wow have times changed. The thing should be archived as like HTML 1.0 Guide... :unsure: well, actually, I have no idea how old the book is. I think I got it in 3rd grade and didn't do anything with it until the summer of my 8th grade year because I was bored! lol

[N]F

Quatrux

Posted 05 July 2006 - 07:07 PM

I don't know if anyone has replied to the 'shortening of Hex values' yet, but there is an easy way.

For values that are first place repetitive (e.g. #ffffff), then simply put the first 3 values (#fff).

If you miss a value from the 6 figure, then it will automatically be given 0.


Yeah, knew about this, but I prefer to change all the #fff to #ffffff, because it is much better for me or maybe even other people to edit or check the colour, I don't know if graphics software like Gimp accepts #fff but it can of course easily be changed.. Besides, you have a much less colours to choose from.. but using #fff and #ffffff together you can save some bytes. :unsure:

twitch

Posted 02 July 2006 - 04:32 PM

I don't know if anyone has replied to the 'shortening of Hex values' yet, but there is an easy way.

For values that are first place repetitive (e.g. #ffffff), then simply put the first 3 values (#fff).

If you miss a value from the 6 figure, then it will automatically be given 0.

doudou

Posted 01 July 2006 - 05:22 AM

With HTML you have limited control over the size of your font. In the most browsers you really only can go from size 1 to 7. I really needed a size between 1 and 2, maybe a size nine on your Microsoft Word. I found the solution in CSS. Not only can you control and change the format of your all your webpages with CSS, you can also control the size of your font more accurately with pts or pc (picas). All you have to do is insert a code in your header section of the html code. Here is a great reference website for learning CSS - http://www.w3schools.com/

As for font color I found a great color guide online. Just bookmark it and use it whenever you need - http://www.webmonkey...ce/color_codes/

vizskywalker

Posted 14 June 2006 - 02:26 AM

No the +1 only applies to the font tag. Which gets it's initial size from the browser, then the size="1' means to +1 on it. The values are from -6 to +6, where you do not need to prefix the positive numbers, this is relative sizing for the browser, absolute sizing is also accepted by the size attribute so you can specify size="12pt" in the font tag.


Good to know. I've stopped using the <font> tag and as far as I can tell deprecated tags since I've been comfining all my html coding to XHTML 1.0 Strict, and I'm know making the switch to XHTML 1.1. So I've been using CSS. I was just worried that CSS would act the same way and cause me problems.

Spekaing of CSS, what's the status update on CSS 3. I know that 2.1 is the current working draft, but I thought I saw a CSS 3 module made working draft. Anyone know where I can find the roadmap for CSS 3 as all I can find is the roadmap for 2.1.

~Viz

Quatrux

Posted 13 June 2006 - 02:06 PM

But on most browsers I know (older versions) I could change the fonts and sizes of <font size=""> numbers from -5 to 5, I could set my own sizes in px. I still can do that on IBrowse and AWeb. Now, as I see I can't change that, only the H1 to H6 and some more stuff. But this is good in my opinion, the font tag is deprecated and it is better to avid using it, unless you want to create a version for old browsers which doesn't fully support CSS or doesn't support it at all or even for browsers which has CSS disabled for don't know what kind of reasons.

But changing font sizes on your browsers settings was a good idea, because some people were browsing with low resolutions some with high and making one standard would be stupid if you couldn't change anything in the preferences.

lonebyrd

Posted 13 June 2006 - 09:52 AM

I'm just beginning to use CSS and come to find out that many things are different when it comes to setting things up on a page. It's like starting all over again. When I first went to do CSS, I started typing it out, set out the font color for text and links, background and all that jazz. Come to find out it didn't work, because everthing had to be written differently. Boy, I've got alot to learn!

mastercomputers

Posted 13 June 2006 - 03:05 AM

Does the setting of 12pt meaning 12pt + 1 font increment apply to CSS as well, or just the <font> tag? And if it applies to CSS as well, why does setting font-size to 12pt work like 12pt + 1 font increment?

~Viz


No the +1 only applies to the font tag. Which gets it's initial size from the browser, then the size="1' means to +1 on it. The values are from -6 to +6, where you do not need to prefix the positive numbers, this is relative sizing for the browser, absolute sizing is also accepted by the size attribute so you can specify size="12pt" in the font tag.

It's hard figuring out the exact (inc|dec)remental sizes used in the font tag but you have 13 alterations available to you, which either increases/decreases the browser's set font size, being proprietary and not suitable for international use, it's probably best not trying to understand it and just make do with what we do have in CSS and how we can use it to achieve our needed results.

Depending on what browsers are capable of, I believe <font> was introduced by Netscape while some of the attributes were introduced by Microsoft. Their intended use was possibly not well thought out and caused a lot of confusion. I'm not sure whether all browsers understand it properly which may suggest why a browser set at 12pt font-size using <font size="1"> may actually ignore the size attribute or misinterpret it's meaning leaving it still represent ing the browsers default of only 12pt, which when styling with CSS will make it appear as 12pt without looking any different to the <font> tag.

I could run my own tests on the actual behaviour for it, but I don't want to increase people's awareness of this tag, rather let it die it's deprecated life and start standardising.

Cheers,

MC

Review the complete topic (launches new window)