Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Is It Okay to Use CSS and HTML in the Same Statement?


gouri - 3:52 pm on Jul 23, 2012 (gmt 0)


@lucy24,

Great example about the pictures. I didn’t think about that, I was probably thinking that there are different rules for text and images.

Reading your posts has really helped me to increase my knowledge of how to layout a page, but I have a couple of questions that I was hoping you could help me with. The answers to some of these questions probably seem pretty obvious to you, but I am not very familiar with it, and this would really help me to understand how best to define font size and layout my page.

(1) For my page header and h1 sections on my template, font sizes are specified in the CSS stylesheet. The page header, for example, is 18px and the h1 is 16px. Should I use inline CSS and write the equivalent of these sizes in points because you mentioned that using px may not be the best thing to do? If I use these sizes as is, should I say font-size: 100% or should I just make no mention of font size since I am accepting the default value (I am asking because the values are specified as px in the stylesheet)? If I wanted to make the font sizes larger, should I use a pt value that is more than 18px and 16px or should I use a font-size greater than 100% (e.g. font-size: 125%)? Would it be good to use font-size: 125% since it would be based on the px measurements in the stylesheet? Would using keywords (e.g. medium, large) be the best thing to do for font size?

(2) For my page header and page footer, I am currently using p style but I was thinking that I should use span style. There is important information in both of these areas, but they are not in paragraph form. Would span style be the right thing to use or should I use the p style? Or is there another way that is better?

(3) In my body text, the way it is laid out is at the top I have a small description to indicate what is on the page (e.g. Widget Building Recommendations), then I have the paragraphs and after the last paragraph, I have a link to the next page. The way I think that I should lay this out is for the small description at the top, I should use span style, for every paragraph, p style, and for the link after the last paragraph, span style. Do you think that this would be good markup?

(4) The default size for the body text, I believe, is 12px. I am thinking that I should make this larger because it will make it easier to read. I have the same questions about this as I do for the page header and h1, but I think that what you say for indicating font size for the page header and h1 I’ll be able to apply to the body text as well.

All the questions that I am asking would be for inline CSS.

I really appreciate your help.


Thread source:: http://www.webmasterworld.com/html/4475562.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com