HighDots Forums  

div vs class, h1,h2, ... ,h5,p,ul?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss div vs class, h1,h2, ... ,h5,p,ul? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian
 
Posts: n/a

Default div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 09:58 AM






When should I use <div> and when should I use <p class="header01">

Reply With Quote
  #2  
Old   
Brian
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 09:59 AM






Sorry, somehow these get cut off when I have css in the e-mail.

continued:

What is the significance with h1,h2,h3,h4,h5,p,ul?

I am pretty confused about the best way to style my text. When should I
do what? Does it even matter?

Thanks for any help!
B

Reply With Quote
  #3  
Old   
Chris In Madison
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:02 AM



In my humble opinion, a paragraph is just that, a logical grouping of
ideas/text, just as if you were reading it in a book. A <div> is a
structural element to me that I would use to build chunks of a web page and
arrnage them as necessary in a fashion that makes sense for my application.

Best regards,
Chris



Reply With Quote
  #4  
Old   
darrel
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:04 AM




Quote:
What is the significance with h1,h2,h3,h4,h5,p,ul?
h# tags are headers. Use them for headers.

p tags are paragraphs. Use them for paragraphs.

ul tags are unordered lists. Use them for unordered lists.

-Darrel




Reply With Quote
  #5  
Old   
Chris In Madison
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:07 AM



<h1>, etc. are headings/subheadings used to categorize content, very similar
to if you were using a heading style in a word processor. You can style
them any way you like, but they're basically there to allow you to group
content in a manner that makes sense to the reader. <p> is a normal
paragraph and you'd likely use one of more of those between/after the
heading tags. Usually a paragraph tag is styled once and that applies to
all paragraphs on the page. Same holds true for heading tags.

<ul> tags are a fun one to style since each browser (in my experience) tends
to style them differently, especially when it comes to indentation and such.
Usually, the <li> tag is the one that gets the fonts, colors, sizes, etc.
assigned to them.

Best regards,
Chris



Reply With Quote
  #6  
Old   
Michael Fesser
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:12 AM



..oO(Brian)

Quote:
What is the significance with h1,h2,h3,h4,h5,p,ul?
Semantics.

'hx' are heading elements. The number denotes the logical nesting level:

<h1>main document heading</h1>
<h2>sub heading</h2>
<h3>sub sub</h3>
<h2>...</h2>

'p' is a paragraph and 'ul' an unordered list. Easy.

Quote:
I am pretty confused about the best way to style my text. When should I
do what? Does it even matter?
Sure does it matter. Don't think of how to style your text first, but
think (carefully!) about _what_ the text really is and how it can be
structured. Then decide which HTML elements fit best and _then_ think
about the styling. First HTML, then CSS.

Micha


Reply With Quote
  #7  
Old   
Michael Fesser
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:12 AM



..oO(Brian)

Quote:
When should I use <div
1) To logically group other elements together.
2) To create a meaningless block-level container, if there's no other
more appropriate element available in HTML.

Quote:
and when should I use <p class="header01"
Looks like you want to use a heading element instead.

Micha


Reply With Quote
  #8  
Old   
Michael Fesser
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:16 AM



..oO(Chris In Madison)

Quote:
ul> tags are a fun one to style since each browser (in my experience) tends
to style them differently, especially when it comes to indentation and such.
Can all be controlled with CSS. Browsers just use different defaults.

Micha


Reply With Quote
  #9  
Old   
Chris In Madison
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:24 AM



Agreed. A fun one to get working consistently, however, at least in my
experience :-)

~Chris



Reply With Quote
  #10  
Old   
Brian
 
Posts: n/a

Default Re: div vs class, h1,h2, ... ,h5,p,ul? - 11-02-2005 , 10:26 AM



Thanks so much!!!

Brian



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.