|
Posted by Andy Dingley on 08/21/06 10:13
bim_bom wrote:
> I have a HTML file with text with different font sizes, colors, etc. - just
> a normal html file.
That's not a "normal" HTML file. That's an obsolete HTML file, coded
according to 10 year old practice. A better approach would be to set
these font settings etc. through CSS - this can give you global control
of a site from one place, and also much better and easier control of
presentation settings.
> Is there a way to add some code at the beginnng of the file, that all the
> later texts are shown in the same size?
Yes, you can add some CSS. The rendering rules are that a presentation
setting expressed in CSS over-rides one expressed in HTML. This is
doubly good - you can ignore the <font> etc. by setting the CSS, and
you can also start refactoring your site and moving your presentation
control to CSS.
This appears to be what you're achieving already. Couple of comments
I'd make though:
* Place the CSS in an external stylesheet, shared by all pages, rather
than on each page.
* Don't use pixels for text sizing (an old FAQ - just search the
group)
* Don't make all the headers the same size - otherwise how can you
tell them apart?
* Look at the "Default CSS stylesheet" that's an appendix to either
the CSS or the HTML spec on the W3C site. That suggests good defautl
CSS settings to use for header sizes.
[Back to original message]
|