Box Model - AH275 - I modified styles significanly.

My own research of W3 I compiled the nuances in the program: Block level and Inline Elements

The main difference between inline and block-level elements is this: Block-level elements always describe their own space on the screen, whereas inline elements are allowed only within the context of a blocklevel element.

For some reason the p style defined does not apply here. Could it be because the external style sheet interferes with it? When I deleted the line for the external style sheet, the border around the p tag still did not work.

066A_Border_with_Div_tag.html has the external style sheet, and everything works.

I discovered why things did not work. In the style section I had <style type = "text/css"> listed twice. The box around p tag also affects the paragraphs which were styled by the external style sheet. I shall try to alter the p which defines borders, and make it into class a.

This paragraph has the default margins and padding.

This paragraph has a margin but no padding.

This paragraph has padding but no margin.

This paragraph has a margin and padding.

The above definitions for margins and padding are not easily visible. I shall increas those values.

I had to specify p.a in the style section, because without it my previous p tags used it.



For convenience I reproduce my file: 038AInline_Block_Elem.html. The link for this is shown above.

Block and Inline elements