My Simple Template for this hand coding site
This is my template for coding this tutorial
It is free for you to copy and use. What you need to do is to make some changes to make it yours.
See notes below ...
<?php $title= ""; ?>
<?php $description= ""; ?>
<?php include("incl/metadata.php"); ?>
<?php include("incl/header.php"); ?>
<article><?php include("art/art-handcode-ipsum.php"); ?> </article>
<?php include("incl/footer.php"); ?>
Changes you can make to this template
- The doctype declaration <!DOCTYPE html> should be the first line .
- I placed them below the php codes because the the title and description will not show up but will be "echoed" in the metadata section. I placed them at the top so that it's easier for me to fill in. You are free to move the 2 lines to the 2nd and 3rd.
- You can leave the <html lang="en"> as it is if your web site is in English. Otherwise, <html> is also fine.
- The <style> is for embeded styling only - meaning for this page only. If it applies to all the pages, moved them to the css file.
- Article class - I could have coded as <article class="content"> but I didn't bother to make the changes after this template was done.
- Clearing the floats <div class="ClearB"> This line was actually for the home page. The rest of the pages contain no floats. Also the clearing of float can be coded in the css file under the footer.
- </body></html> can be coded in the same line or bring the </html> to the next line. It's my habit.
- The main difference between my template and others -
- You'll notice my content is placed in the /art folder. I've not seen any one doing this except for CMS which are stored in MySQL. Most of the webmasters would place the content directly in the web pages. I do not know if there is any SEO penalty in case the search engines picked up the files and considered that as duplicate contents.