I don't feel 50 Forums

Go Back   I don't feel 50 Forums > COMPUTERS > Web Design and Graphics Room.

Web Design and Graphics Room. Thread, Basic Website Code Templates

OK I will show two Basic Code Templates for those learning HTML. The first is for HTML 4.1, the second ...

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12th-January-2008, 11:27 AM
CPS's Avatar
CPS CPS is offline
 
Join Date: Jan 2003
Location: Suffolk/ Gender Male
Posts: 1,444
Default Basic Website Code Templates

OK I will show two Basic Code Templates for those learning HTML.
The first is for HTML 4.1, the second for XHTML 1.
To save them just copy and paste the code into Notepad,
then save with a name of your choosing, name.txt to just save the code.
Or save as name.htm to save as a web page that will open in a browser.
Note the first page of a website is always saved as index.htm,
thats what a Browser looks for to show the first page.

HTML 4.1 Code
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!---the above is the DTD (document type definition)
this tells the Browser what set of code rules to use--->

<html>

<head>

<title>Untitled Document</title>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


</head>

<body>

<h2><font face="Times New Roman, Times, serif">This a template for HTML 4.1</font> </h2>

</body>

</html>
===============================================
XHTML 1.0 Code

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!---the above is the DTD (document type definition)
this tells the Browser what set of code rules to use--->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


</head>

<body>


<h2><font face="Times New Roman, Times, serif">This a template for XHTML 1.0</font></h2>

</body>

</html>
__________________
Knowledge is not knowing all the answers,
but knowing where to find the answers.

www.smitheram.co.uk

Moderator of, Web Design/Graphics Room.
P4-XP pro-IE7-B/B-ZA-AVG
Reply With Quote
  #2  
Old 13th-January-2008, 11:44 AM
CPS's Avatar
CPS CPS is offline
 
Join Date: Jan 2003
Location: Suffolk/ Gender Male
Posts: 1,444
Default

Here is a more advanced Template using XHTML DTD.
This forms the basic code for the pages I use in my website.
It uses a Table to contain my page and CSS to control link colors,
also to prevent a background image from scrolling if you use one.

The Code

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>Your own Title</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css"><!--
a:link {color:blue;}
a:visited {color:blue;}
a:hover{color:red;
-->
  </style>


<style type="text/css">
<!--
body {background-attachment: fixed;}
//-->
</style>


</head>

<body bgcolor="#FFFFFF">




<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>

    <td height="530" valign="top" bgcolor="#E9EDF6"> 
      
      
      <h2 align="center"><font face="Times New Roman, Times, serif"> This template 
        is XHTML using a Table set to 100%,

        this means it will fit any screen resolution.

        It also uses CSS styles to control link colors and

        to prevent any background image from scrolling.</h2>

      </td>

  </tr>

</table>

 </body>

</html>
__________________
Knowledge is not knowing all the answers,
but knowing where to find the answers.

www.smitheram.co.uk

Moderator of, Web Design/Graphics Room.
P4-XP pro-IE7-B/B-ZA-AVG
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.