Order of statements

Discussion in 'HTML' started by tshad, Mar 2, 2005.

  1. tshad

    tshad Guest

    I just want to see if I have this in the correct order.

    This is the way all my pages are set up.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
    <!-- #include file="..\includes\slidemenus.inc" -->
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Home Page</title>
    <link href="../css/staffing.css" rel="stylesheet" type="text/css">
    </head>
    <body>

    Does it matter where the <link> or #include statements are?

    I assume the #includes can go anywhere as they are preprocessed files that
    become part of the html file.

    Metas go in the head section.

    I assume <script> goes anywhere also.

    Thanks,

    Tom
    tshad, Mar 2, 2005
    #1
    1. Advertising

  2. tshad

    Mark Parnell Guest

    Previously in alt.html, tshad <> said:

    > Does it matter where the <link> or #include statements are?


    <link> has to be in the <head>.
    http://www.w3.org/TR/html4/struct/links.html#edef-LINK

    #include can be anywhere in the file as far as the server is concerned,
    but...

    > I assume the #includes can go anywhere as they are preprocessed files that
    > become part of the html file.


    ....as long as the end result is still valid. In your example, that is
    extremely unlikely, unless the include file is blank, or contains only
    comments.

    > Metas go in the head section.


    Yes.

    > I assume <script> goes anywhere also.


    <script> can go either in the head or the body.
    http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Mar 2, 2005
    #2
    1. Advertising

  3. tshad

    tshad Guest

    "Mark Parnell" <> wrote in message
    news:18yibfvy86wtr.gni9y6f7b4gy$...
    > Previously in alt.html, tshad <> said:
    >
    > > Does it matter where the <link> or #include statements are?

    >
    > <link> has to be in the <head>.
    > http://www.w3.org/TR/html4/struct/links.html#edef-LINK
    >
    > #include can be anywhere in the file as far as the server is concerned,
    > but...
    >
    > > I assume the #includes can go anywhere as they are preprocessed files

    that
    > > become part of the html file.

    >
    > ...as long as the end result is still valid. In your example, that is
    > extremely unlikely, unless the include file is blank, or contains only
    > comments.


    Actually, it contains javascript. So I suppose it is not valid (even though
    it does work).

    Thanks,

    Tom

    >
    > > Metas go in the head section.

    >
    > Yes.
    >
    > > I assume <script> goes anywhere also.

    >
    > <script> can go either in the head or the body.
    > http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au
    tshad, Mar 2, 2005
    #3
  4. tshad

    Toby Inkster Guest

    tshad wrote:

    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
    > <!-- #include file="..\includes\slidemenus.inc" -->
    > <html>


    You are unlikely to really want to put an include file there. (It is
    possible if it only does some server side processing without printing out
    any results.)

    Assuming that the contents of this include file are to be displayed on
    screen, put it in the BODY.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Mar 2, 2005
    #4
    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. Neil Zanella
    Replies:
    8
    Views:
    1,170
    mfmehdi
    Oct 20, 2006
  2. Harry George
    Replies:
    6
    Views:
    363
    Bart Nessux
    Feb 23, 2004
  3. Gabriel

    order of #include statements

    Gabriel, Jan 20, 2006, in forum: C++
    Replies:
    7
    Views:
    475
    Gabriel
    Jan 24, 2006
  4. Vince
    Replies:
    12
    Views:
    738
    Martin Gregorie
    Jan 21, 2008
  5. John Crichton
    Replies:
    6
    Views:
    254
    John Crichton
    Jul 12, 2010
Loading...

Share This Page