Question about css structure and layout

Discussion in 'HTML' started by Bill, Apr 8, 2006.

  1. Bill

    Bill Guest

    I'm learning web design and have a few questions.

    I started out with Front Page 2003 and then discovered css. Front Page has
    some support but it's all inline. I jumped to Dreamweaver which supports
    css separete sheets but seems to prefer putting the css code in directly on
    the page. Seems to me that other than some one time only section that most
    if not all of the css code should be on a seperate sheet, after all isn't
    that the reason for css in the first place, to seperate content from style??

    I guess what I'm asking is what is the correct way to apply css to a web
    page. Is it just personal preference or is there a more technically correct
    way. Mainly what I'm intested in is having minimum non-content on the html
    page so that if it is 'viewed' with something other than a graphical
    browser, something like a browser that 'speaks' the page for a blind person,
    it still can get the basic info across. Does anyone know how those kind of
    browsers handle inline or on page css code??

    Another question I have is how I should handle the content itself. Is there
    anything out there that can tell me what should be an h1 vs h2, etc.... I
    mean is it top down like an outline or do the tags h1,h2,h3, etc just really
    relate to the items look. I was wondering if they made a difference with
    different browsers.

    One last question on css. If I'm looking for 'pure' content in the html
    code should I really be using <br> to break up content in a paragraph or
    would it be more correct to use a div with a setting in the style sheet?

    Inquiring minds want to know.....

    Bill
     
    Bill, Apr 8, 2006
    #1
    1. Advertising

  2. Bill

    Neredbojias Guest

    To further the education of mankind, "Bill" <>
    declaimed:

    > I'm learning web design and have a few questions.
    >
    > I started out with Front Page 2003 and then discovered css. Front
    > Page has some support but it's all inline. I jumped to Dreamweaver
    > which supports css separete sheets but seems to prefer putting the css
    > code in directly on the page. Seems to me that other than some one
    > time only section that most if not all of the css code should be on a
    > seperate sheet, after all isn't that the reason for css in the first
    > place, to seperate content from style??


    The advantage to separate style sheets is that they can apply to multiple
    pages. Head-section-ensconced css is not wrong but it may not be optimal
    for a particular situation. Inline css is not wrong, either, but should
    probably be avoided where possible in the interests of clarity and
    utility.

    > I guess what I'm asking is what is the correct way to apply css to a
    > web page. Is it just personal preference or is there a more
    > technically correct way. Mainly what I'm intested in is having
    > minimum non-content on the html page so that if it is 'viewed' with
    > something other than a graphical browser, something like a browser
    > that 'speaks' the page for a blind person, it still can get the basic
    > info across. Does anyone know how those kind of browsers handle
    > inline or on page css code??


    See above.

    > Another question I have is how I should handle the content itself. Is
    > there anything out there that can tell me what should be an h1 vs h2,
    > etc.... I mean is it top down like an outline or do the tags
    > h1,h2,h3, etc just really relate to the items look. I was wondering
    > if they made a difference with different browsers.


    The more semantically-correct the markup, the better it is. Using <hn>
    tags can be a bit of an art but certainly one that is intuitively easy to
    master.

    > One last question on css. If I'm looking for 'pure' content in the
    > html code should I really be using <br> to break up content in a
    > paragraph or would it be more correct to use a div with a setting in
    > the style sheet?


    If general content of a paragraph really needs a lf/cr, <br> is quite
    acceptable. Formatted content may require other means.

    > Inquiring minds want to know.....


    --
    Neredbojias
    Infinity can have limits.
     
    Neredbojias, Apr 8, 2006
    #2
    1. Advertising

  3. Bill

    kchayka Guest

    Bill wrote:
    >
    > anything out there that can tell me what should be an h1 vs h2, etc....


    For a good HTML 4 reference, see
    <URL:http://www.htmlhelp.com/reference/html40/olist.html>

    > is it top down like an outline or do the tags h1,h2,h3, etc just really
    > relate to the items look.


    Generally speaking, it is more like an outline. Looks aren't relevant,
    since they can easily be changed with CSS.

    > should I really be using <br> to break up content in a paragraph or
    > would it be more correct to use a div with a setting in the style sheet?


    It would be more correct to use paragraph markup for paragraphs. ;)
    IOW, <p>

    Don't use <div> (or <span>) when there is a more appropriate element for
    the particular job.

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
     
    kchayka, Apr 10, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    747
    clintonG
    Dec 24, 2004
  2. Guybrush Threepwood

    Table-based layout to CSS layout

    Guybrush Threepwood, Jun 6, 2006, in forum: HTML
    Replies:
    20
    Views:
    1,032
  3. Replies:
    1
    Views:
    603
    John Timney \(MVP\)
    Jun 19, 2006
  4. Habib

    Css-Layout vs Table-Layout

    Habib, Jun 19, 2006, in forum: HTML
    Replies:
    15
    Views:
    1,030
    Wÿrm
    Jun 20, 2006
  5. Replies:
    29
    Views:
    895
    Ben C
    Mar 21, 2008
Loading...

Share This Page