Rip this apart...

Discussion in 'Web Design & Programming' started by Waffle, Jun 17, 2005.

  1. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    I just noticed that the pages you are including are whole HTML pages, which include all the tags like <title> etc there should only be one such tag long with others which belong in the <head> section.
     
  2. Waffle

    Waffle Alpha Geek

    Likes Received:
    38
    Trophy Points:
    0
    so the php includes should literally be just php tags and the content?

    no html other than the indexs'?
     
  3. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    I'm not sure what you mean.

    the files you are including should only contain the content, any html should be used for formating only e.g. using tables

    you don't need have any php code in the files you are including.
     
  4. Waffle

    Waffle Alpha Geek

    Likes Received:
    38
    Trophy Points:
    0
    yeh i've got it like that, well, as far as i know. i cant see any visible problems, so i guess its ok.
     
  5. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    nope if you view the code index page or any pages that you have included you have this code

    HTML:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    
    <body>
    <table width="585" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><p><strong>Welcome to AG Neads Construction and Maintance Company.</strong></p>
          <p>The site is currently under construction, so please report any bugs to the <a href="mailto:[email protected]">webmaster</a>. </p>
    
          <p>Home, About, Contact are working. </p>
          <p>I can set up a contact form if needed as well. <br>
            </p>
          <p align="center"><img src="images/tesco_home.gif" alt="Tesco - Dorchester. " width="460" height="301"><br>
              <strong>Tesco - Dorchester. Brick Paviers Quote by A.G. Neads Limited.</strong></p>
        <p>&nbsp;</p></td>
      </tr>
    
    </table>
    <p>&nbsp;</p>
    </body>
    </html>
                </span></div></td>
              </tr>
          </table></td>
      </tr>
      <tr>
        <td><img src="images/content_box_foot.gif" width="640" height="47"></td>
      </tr>
    
    </table>
    </BODY>
    </HTML>
    
    when you only need this

    HTML:
    <table width="585" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><p><strong>Welcome to AG Neads Construction and Maintance Company.</strong></p>
          <p>The site is currently under construction, so please report any bugs to the <a href="mailto:[email protected]">webmaster</a>. </p>
    
          <p>Home, About, Contact are working. </p>
          <p>I can set up a contact form if needed as well. <br>
            </p>
          <p align="center"><img src="images/tesco_home.gif" alt="Tesco - Dorchester. " width="460" height="301"><br>
              <strong>Tesco - Dorchester. Brick Paviers Quote by A.G. Neads Limited.</strong></p>
        <p>&nbsp;</p></td>
      </tr>
    
    </table>
    
    I hope you understand what you mean?
     
    Waffle likes this.
  6. Exfoliate

    Exfoliate Geek Trainee

    Likes Received:
    166
    Trophy Points:
    0
    You're a clever man Sniper:good:
     
  7. Waffle

    Waffle Alpha Geek

    Likes Received:
    38
    Trophy Points:
    0
    I understand that, but I don't see the advantage if there is one? Is it just the correct coding 'practice', or is there some benefit of removing the unnecessary tags.
     
  8. Sniper

    Sniper Administrator Staff Member

    Likes Received:
    59
    Trophy Points:
    63
    well, the syntax will be invalid also you will have html code thats not needed and serves no purpose.
     
  9. zRoCkIsAdDiCtInG

    zRoCkIsAdDiCtInG HWF Guitar Freak

    Likes Received:
    98
    Trophy Points:
    0
    how about a nice shortcut bar to other projects on the left side that matches the top scheme
     

Share This Page