![]() |
|
|||||||
OK I will show two Basic Code Templates for those learning HTML. The first is for HTML 4.1, the second ...
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|