Webmaster - Your first website
Instruction::
To open a file right-click on its icon which opens a menu of commands. Drag your cursor down to [Open with ...] which opens a list of different software for opening your file:
- Notepad: click on Notepad to see your code, otherwise called "source".
- Browser: clicking on Internet Explorer (IE) will make this Internet browser IE open your file. Most people use Mozilla Firefox or IE. This will show you how your website will look to your user.
- Other Browsers: download other browsers like Mozilla's Firefox. After downloading they will automatically appear in your [Open with ...]. Your final testing should use all the popular browsers.
To download other browsers type their name into Google or Yahoo, etc, and up will pop the addresses where you can get free downloads. Click on the download buttons, and, if they ask, have the browsers installed into your C://Program Files/.
Otherwise try these free browsers:
- Opera at http://www.opera.com/
- Mozilla's Firefox at http://www.mozilla-europe.org/en/firefox/
- IE at http://www.microsoft.com/windows/downloads/ie/
- Netscape, now out of production but an old favorite, at http://browser.netscape.com/releases
- AOL at http://browser.netscape.com/
APC, the most popular computing magazine, states that most of those users in contact, use the browser Mozilla Firefox. I now use Firefox as my main browser altho I prefer the formating of IE (Internet Explorer). Since formating across the range of browsers is variable, you should test your scripting in all popular browsers before uploading to your webhost.
After installing these browsers, you are ready to proceed.
This chapter will give you a website ready to upload to your webhost.
This website is simple and will let you explore different possibilities in content. As you become familiar with your website script you can change the format.
Remember that just one mistake is enough to prevent your script from working. Your computer cannot guess what you want.
Follow these steps very carefully:
- Create a folder/directory www: To create a folder, go to your Window Explorer (not Internet Explorer or web browser). This is your main index page which shows the partitions on your hard drive and all their contents.
Goto Menu >> File >> New >> Folder and click to create an icon of a folder New Folder. Type www + [Enter] to change its name.
Save everything inside this folder.
- Create a file, call it index.htm: and save it into your folder www:
- Open your text editor, called Notepad. Do NOT use MSWord or Wordpad, and convert – they may corrupt the page and you might never find the defect.
- In your folder www save this file as index.htm.
- Cut and paste the following script into it.
- Save.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>?your title?</title>
<meta name="author" content="?Type your name.?" />
<meta name="keywords" content="?Type words and phrases which best describe your site content and aims. Separate the words and phrases by commas.?" />
<meta name="description" content="?Type a brief description of your aims and content.?" />
</head>
<frameset>
<noframes> This tells "no-frame" users why they cannot access this work.
<body>
This website is constructed with frames for easy access to all the information.
Your browser does not allow frames (or you have disabled them).
Providing a second website without frames would double my work and double my costs.
Instead, please download a free browser that allows frames.
</body>
</noframes>
<frame name="home" src="index_major.htm" scrolling="no" marginheight="0" marginwidth="0"/>
</frameset></html>
- Note the question marks: Replace these and anything between, with words of your choice.
- Open Notepad and save as index.html: Repeat the same step exactly except that the name of this file has the letter 'l' on the end of '.htm'. This is because people may visit your site using either ending, but can only open the file with the exact name.
- Open Notepad and save as index_major.htm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>frames</title>
<meta name="author" content="?type your name?" />
</head>
<frameset cols="160,620,*" frameborder="0" border="0" > "border" for Netscape; "frameborder" for Internet Explorer; framespacing="n" increases space between frames but used by only Internet Explorer, so do not use.
<frameset rows="85,*" frameborder="no" border="0" > frameset includes 2 frames: logo, index.
<frame name="logo" src="1_logo.htm" scrolling="no" marginheight="0" marginwidth="0" />
<frame name="index" src="2_index.htm" scrolling="auto" marginheight="0" marginwidth="0" />
</frameset>
<frame name="f2" src="3_first_page.htm" scrolling="auto" marginheight="0" marginwidth="0" /> for content.
<frame name="f3" src="4_f3.htm" scrolling="auto" marginheight="0" marginwidth="0" /> for photos, advertizing, etc
</frameset>
</html>
- Create file 2_index.htm: and add this content.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>first page</title>
<style>
a:link, a:active, a:visited {text-decoration:none};
</style>
</head>
<body style="background-color:#ccffff;color:#0000ff;">
<a href="21_intro.htm" target="f2">Intro</a> The a-tag gives a link to another file, saying 'please open'.
<a href="22_.htm" target="f2">My 2nd file</a>
<a href="23_.htm" target="f2">My 3rd file</a>
<a href="24_.htm" target="f2">My 4th file</a>
<a href="25_.htm" target="f2">My 5th file</a>
<a href="26_.htm" target="f2">My 6th file</a>
<a href="27_.htm" target="f2">My 7th file</a>
<a href="28_.htm" target="f2">My 8th file</a>
<a href="29_.htm" target="f2">My 9th file</a>
<br /><br /></body></html>
- Create file 3_first_page.htm: and add this content.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>first page</title>
<style>
a:link, a:active, a:visited {text-decoration:none};
</style>
</head>
<body style="background-color:#ccffff;color:#0000ff;">
<br /><p style="font:bold 24pt; color:#ff0000;">Welcome to your website !</p>
<br />This is a simple web page,
<br />to get you started.
<br /><br />As you learn XHTML you will change my scripting
<br />to speed your user's access
<br />and brighten your page.
<br /><br />You can now play around,
<br />adding content such as text and photos.
<br />Remember to copy the templates,
<br />and change the name of your copy,
<br />before adding text.
<br />Keep your templates clean for reuse.
<br /><br />The next steps are :
<ul>
<li>check your files give the desired result; that all your links work.</li>
<li>download free FTP software for uploading your files. (Google it.)</li>
<li>buy a domain name</li>
<li>contact a webhost</li>
<li>follow your webhost's instructions for uploading your webpages, usually into your folder named www.</li>
<li>Use your browser to access your website.</li>
<li>Check that it looks good. If not, change your scripting. Different browsers give different views. Your job is to make all browsers show your website to good advantage - this is difficult and tedious.</li>
<li>Now you are a webmaster.</li>
</ul>
<br /><p style="font:bold 24pt;color:#ff0000;text-align:center;">Happy WebMastering !</p>
<br /><br /></body></html>
- Create a file called 4_f3.htm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>first page</title>
<style>
a:link, a:active, a:visited {text-decoration:none};
</style>
</head>
<body style="background-color:#ccffff;color:#0000ff;">
<br /><img src="11th_parrot.jpg" />
<br /></body></html>
- Instal an image:
- right-click on this image
- drag down to [Save image as]
- save image as 11th_parrot.jpg inside your folder www
![Rosella parrot [1KB]](images/11th_parrot.jpg)
- Test file index_major.htm: double-click on this file. Your browser should open it automatically because it is an htm file. If not, right-click to [Open with ...] and select your browser, usually Internet Explorer, Netscape or Mozilla Firefox.
- Failure ? Try to work out which file has failed. Delete the contents of that file, and copy and paste from this file again. Otherwise read the instructions carefully and repeat the whole procedure. [I have tested this and it works.]
- Success ? Then double-click on index.htm and, if satisfied, on index.html.
- Success ? Open these index.htm with each browser to check their formating. Are they all good ?
- Success ? Your files are ready to upload to your webhost.
Congratulations !
One final point: Many programmers recommend indenting or tabbing tags, so pairs of opening and closing tags have the same indentation, like this:.
<html>
<head>
<style>
</style>
</head>
<body>
<div>
<p>
<font>
<span>
</span>
</font>
</p>
</div>
</body>
<html>
A few indentations, and you have a page stretching off your screen, forcing you to repeatedly scroll out to the right then back to the left, and out to the right again.
Or else you get 10 words to a line before forced to make a line-break. Ten words, including tags, is not many. So then your page stretches down to hell, and you spend your day scrolling up and down.
My initial enthusiasm for this technique when Java programing, faded after a few months to the extent that I returned to my templates and removed all the indentations – thousands of them. Try it to see how you fare.
They are manageable when using software designed to do this, but their file-sizes are scornfully large and their coding too clumsy to fix or maintain. KISS.
Without these little techniques which so increase your file-size, your skills will grow quickly till you work just as quickly without them.