Tag: html

  • Php and html minitips

    Set your site’s base (all links will think of it as the site root)

      Say your page is located at:
        yukiko/pages/news/IGotAJob.html
      In your page’s <head> tag put the root page:
       <base href=”yukiko/index.php”>
      So instead of linking relative to the page,
       <img href=”yukiko/index.php” src=”/images/janitor.jpg” />
      a link will be relative to the site root.
       <img href=”yukiko/index.php” src=”yukiko/images/janitor.jpg” />

    Dump another html file into the current php file:

      <?php include “header.html”; ?>

    Good site setup (for me at least):

      yukiko/

      • pages/
        • header.html
        • footer.html
        • page1.php

      • css/
        • header.css
        • footer.css
        • style.css
        • index.css
        • page1.css

      • images/
      • index.php