<div class="section" id="menu"> or <div class="subsection" id="menu">

Discussion in 'HTML' started by Luigi Donatello Asero, May 22, 2006.

  1. Hello,
    I tried to include the menu on different pages using
    <?php include_once "menu-italiano.html"; ?>
    or whatever the menu is called depending on the language.
    The menu is inserted on pages which already have a main heading with
    a <div class="section" id="...">
    Now the problem is that I would like to use a model where the main heading
    of the menu is not as much important as the main heading of the whole page
    and the menu is regarded as just a part of it. Therefore I thought that I
    would use <div class="subsection" id="menu">
    However the html file menu-italiano.html does not validate
    http://www.htmlhelp.com/cgi-bin/val...a-gigi.com/it/menu-italiano.html&warnings=yes
    Now I wonder:
    whether I should add the document type declaration even if it is a file
    which is included and which place in the hierarchy the first <div class> in
    the menu should have, the first (section) or the second (subsection)?
    The former would suit the inserted html document as such but the latter
    would suite the structure of the whole main page where the menu is inserted,
    wouldn´t it?


    --
    Luigi Donatello Asero
    https://www.scaiecat-spa-gigi.com/
    Write in peace for peace
     
    Luigi Donatello Asero, May 22, 2006
    #1
    1. Advertising

  2. Luigi Donatello Asero wrote:
    > Hello,
    > I tried to include the menu on different pages using
    > <?php include_once "menu-italiano.html"; ?>
    > or whatever the menu is called depending on the language.
    > The menu is inserted on pages which already have a main heading with
    > a <div class="section" id="...">
    > Now the problem is that I would like to use a model where the main heading
    > of the menu is not as much important as the main heading of the whole page
    > and the menu is regarded as just a part of it. Therefore I thought that I
    > would use <div class="subsection" id="menu">
    > However the html file menu-italiano.html does not validate
    > http://www.htmlhelp.com/cgi-bin/val...a-gigi.com/it/menu-italiano.html&warnings=yes


    Whoah! First read the error message! 'section' vs 'subsection' has
    nothing to do with the error:

    Line 1, character 1:
    <div class"subsection" id="menu">
    ^
    There is you error, no '=' should be

    <div class="subsection" id="menu">

    > Now I wonder:
    > whether I should add the document type declaration even if it is a file
    > which is included and which place in the hierarchy the first <div class> in
    > the menu should have, the first (section) or the second (subsection)?
    > The former would suit the inserted html document as such but the latter
    > would suite the structure of the whole main page where the menu is inserted,
    > wouldn´t it?
    >
    >



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, May 22, 2006
    #2
    1. Advertising

  3. Luigi Donatello Asero

    Martin Jay Guest

    In message <xzlcg.1322$>, Luigi Donatello Asero
    <> writes

    >However the html file menu-italiano.html does not validate
    >http://www.htmlhelp.com/cgi-bin/validate.cgi?url=https://www.scai
    >ecat-spa-gigi.com%2Fit%2Fmenu-italiano.html&warnings=yes
    >Now I wonder:
    >whether I should add the document type declaration


    Why not validate it as part of document it's included in?

    Let's say index.php includes menu-italiano.html. Validate index.php and
    menu-italiano.html is validated at the same time.

    You can't have two document type declaration in the same HTML document.

    I prefer to put menus at the top of the HTML document, something like
    this:

    <h1>Main heading</h1>

    <div class="menu">
    <h2>Menu</h2>
    <ul>
    <li>Menu item</li>
    <li>Menu item</li>
    <li>Menu item</li>
    </ul>
    </div>

    <div class="main_text">
    <h2>Document text</h2>
    <p>Blah, blah, blah...</p>
    </div>
    --
    Martin Jay
     
    Martin Jay, May 22, 2006
    #3
  4. "Jonathan N. Little" <> skrev i meddelandet
    news:4471ebca$0$3682$...
    > Luigi Donatello Asero wrote:
    > > Hello,
    > > I tried to include the menu on different pages using
    > > <?php include_once "menu-italiano.html"; ?>
    > > or whatever the menu is called depending on the language.
    > > The menu is inserted on pages which already have a main heading with
    > > a <div class="section" id="...">
    > > Now the problem is that I would like to use a model where the main

    heading
    > > of the menu is not as much important as the main heading of the whole

    page
    > > and the menu is regarded as just a part of it. Therefore I thought that

    I
    > > would use <div class="subsection" id="menu">
    > > However the html file menu-italiano.html does not validate
    > >

    http://www.htmlhelp.com/cgi-bin/val...a-gigi.com/it/menu-italiano.html&warnings=yes
    >
    > Whoah! First read the error message! 'section' vs 'subsection' has
    > nothing to do with the error:
    >
    > Line 1, character 1:
    > <div class"subsection" id="menu">
    > ^
    > There is you error, no '=' should be
    >
    > <div class="subsection" id="menu">



    You are right.
    I made a mistake (certainly not the first and probably and unfortunately not
    the last...)

    --
    Luigi Donatello Asero
    https://www.scaiecat-spa-gigi.com/
    Write in peace for peace
     
    Luigi Donatello Asero, May 22, 2006
    #4
  5. "Martin Jay" <> skrev i meddelandet
    news:...
    > In message <xzlcg.1322$>, Luigi Donatello Asero
    > <> writes
    >
    > >However the html file menu-italiano.html does not validate
    > >http://www.htmlhelp.com/cgi-bin/validate.cgi?url=https://www.scai
    > >ecat-spa-gigi.com%2Fit%2Fmenu-italiano.html&warnings=yes
    > >Now I wonder:
    > >whether I should add the document type declaration

    >
    > Why not validate it as part of document it's included in?
    >
    > Let's say index.php includes menu-italiano.html. Validate index.php and
    > menu-italiano.html is validated at the same time.
    >
    > You can't have two document type declaration in the same HTML document.


    No, I cannot. So the only way seems to try and validate only the main
    document which includes the menu as well.
    Now https://www.scaiecat-spa-gigi.com/it/benvenuti.php validates

    > I prefer to put menus at the top of the HTML document, something like
    > this:
    >
    > <h1>Main heading</h1>
    >
    > <div class="menu">
    > <h2>Menu</h2>
    > <ul>
    > <li>Menu item</li>
    > <li>Menu item</li>
    > <li>Menu item</li>
    > </ul>
    > </div>
    >
    > <div class="main_text">
    > <h2>Document text</h2>
    > <p>Blah, blah, blah...</p>
    > </div>
    > --


    Well, I have a <div class="subsection" id="head">
    in between with a kind of introduction.

    --
    Luigi Donatello Asero
    https://www.scaiecat-spa-gigi.com/
    Write in peace for peace
     
    Luigi Donatello Asero, May 22, 2006
    #5
    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. Luigi Donatello Asero

    <div class="position"> and <div class" section">

    Luigi Donatello Asero, May 6, 2006, in forum: HTML
    Replies:
    31
    Views:
    1,239
    Toby Inkster
    May 7, 2006
  2. Luigi Donatello Asero

    Re: <div class="position"> and <div class" section">

    Luigi Donatello Asero, May 6, 2006, in forum: HTML
    Replies:
    0
    Views:
    413
    Luigi Donatello Asero
    May 6, 2006
  3. Luigi Donatello Asero

    Re: <div class="position"> and <div class" section">

    Luigi Donatello Asero, May 6, 2006, in forum: HTML
    Replies:
    1
    Views:
    438
    Luigi Donatello Asero
    May 6, 2006
  4. Replies:
    4
    Views:
    454
    Peter Flynn
    Sep 12, 2006
  5. Dr John Stockton
    Replies:
    0
    Views:
    95
    Dr John Stockton
    Sep 12, 2003
Loading...

Share This Page