Max does a very nice job of pointing out the differences in the two types
of containers.
So, following Max’s explanation, it is practical to use the body tag when
you want to make a global setting on the page. I use it to set my basic
font settings like font-family, line-height, letter-spacing, color and base
size. Then I set specific deviations using the appropriate tags (h1, h2,
etc.) I almost never touch the p tag as all my other text styles will be
span classes (like strong or em) and so don’t care whether it is applied to
a paragraph, header or list item.
However, you should not treat lists like paragraphs… generic attributes
shared by all elements are okay but specific attributes should be targeted
with the appropriate tags, otherwise you could end up with a real mess.
If you plan your styling, then you’ll be rewarded with cleaner, more
professional-looking code… no need to tell the browser to apply the same
style to every paragraph. Just the right style at the right place.
–
Ernie Simpson
On Sat, Jun 9, 2012 at 2:15 AM, RavenManiac email@hidden wrote:
I think I understand the differences between these two types of tags, but
in practice is it better to use the p tags or a .body styles for the
default styling of your web page?
Also, I noticed that if I have a list of items, the .body style will
properly style the list, but the p tag will not. How do you style lists in
that situation?
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options