Page is a not externally linkable
lucy24 - 11:30 pm on Aug 8, 2012 (gmt 0)
I think that I would have to create definitions for my h1 tag, h2 tag, paragraph tag, etc. It is not a matter of changing some of the specifications for these tags, and I think that this is one of the things that I would like to have a better understanding of.
The format of headings is a combination of the browser's individual preferences, and rules for what a "compliant user-agent" is supposed to do. But if you try your code in a bunch of different browsers, you will see that the headings are all pretty much the same. You can safely assume that heading size is proportional, not absolute. So if the default body text is 14pt the headings will be a little bigger than if the default body text is 12pt.
At the moment, if I create an h1 tag, for instance, and use a percentage (e.g. 125%) for the font-size, would the base value be the font-size mentioned in the CSS stylesheet for the heading box, which I believe is 16px, and would the text that I type be 125% larger than 16px?
Or is the default size for the h1 tag and other elements determined by the browser? If I know which one is used, then I can decide what percentage to use for the font-size.
Scroll up a bit to the post where I talked about
<p class = "comment">
<span class = "notation">
If your CSS says
h1 {font-size: 125%;}
and the HTML says simply
<h1>blahblah</h1>
the heading size will be 125% of the surrounding text. Normally that means the overall default text size, unless the heading is inside something that has its own size setting. So if your heading is inside a box whose font-size is explicitly set to 16px, the heading will come out to 20px.
But if you say
<h1><span style = "font-size: 125%">blahblah</span></h1>
then the entire text of the header will be 125% of whatever size the browser has set for the header.
Anything you say in CSS, whether inline or in a style sheet, will override defaults. That's what styles are for. Unless the user has expressly said "Always use my styles" (or similar) in their browser prefs.
Can you change the "16px" setting? It's an odd size for a sans-serif font; it makes the whole box look a little bigger and more emphatic than ordinary type. Is that the intention of this area? It seems redundant if you're also going to put in a heading.
For paragraphs, should I use inline CSS and specify that I want my paragraphs to be font-family Arial and font-size 13pt, or should I indicate font-family Arial and font-size 125% (or another percentage if that’s what makes the font-size 13pt) and the size of the text will be based on some default size (Would the default size be that which is set by the browser or the body text box in my template?)? Would both options resize if someone (1) zooms in on the whole page and (2) zooms in on the text only?
I think we've talked about zooming already. Scroll back.
Font-family and font-size can both be applied to divs. So if it is genuinely impossible for you to use a stylesheet, then you can wrap all your paragraphs in a single div. But, again, think carefully about whether you want to force a size or font-family for the body text. Does your template say anything about size of body text? Can you change it? If it has to say something, you can say "font-size: inherit" and it will be just as if you didn't mention a size at all.
the text (font size 3 [using html at the moment], but have seen this same thing happen on websites using CSS for font-size) on the pages of the site that I am working on appears smaller when I look at it on the site than when I copy and paste it into Microsoft word? Can you please tell me why this is occurring? I want the text size on the website to be the same size as it appears on Microsoft Word.
Microsoft Word is a word processor. Are you talking about an HTML Preview function? (I, er, haven't used it since Word 5.1.) Please don't use the HTML <font> property at all, for any reason. It is heavily deprecated and there are always alternatives. This goes double for values like "size='3'" or "large" where the exact proportion is up to the browser. If you use percentages, the proportions will be almost identical everywhere. Sometimes there will be tiny hiccups based on the user's physical setup, but these are most noticeable at very small sizes.