| |
|
Tutorial The following is a simple tutorial explaining the basics of how to write a simple web page. If you are using Microsoft Windows, all that is needed is Note Pad to write the pages and Internet Explorer to view your results. It is important to save your file in Note Pad with an .htm extension. After you have saved the file you can open it a view it using the File Open command in Internet Explorer. Introducing tags The language of the web is call hypertext markup language which is commonly referred to as html. Text is formatted by placing it between special tags that are used to describe the formatting. Tags are not case sensitive and take the form of <format>your text</format>. Notice that the end tag includes a "/ " At its simplest a web page needs the following tags to make a properly formed html page. <html> Paragraph formats The basic text tags are the <p> and </p> tags which are used to define paragraphs. There are also six levels of headings that are available, with the largest being <h1></h1> and the smallest being <h6></h6>. Here is an example <p>This is some paragraph text. This is some paragraph
text. This is some paragraph text.</p> It looks like this This is some paragraph text. This is some paragraph
text. This is some paragraph text.
This is heading oneThis is heading twoThis is heading fiveThis is heading sixIf you want to create a line break you use the <br> tag. This is one tag that does not have a closing tag. Here is an example <p>This is some paragraph text. This is some paragraph text<br> This is some paragraph text.</p> It looks like this This is some paragraph text. This is some paragraph
text.
This is some paragraph text. Changing how fonts look The ability exists to be able to change the font type, colour and size. Here is an example <p><font face="courier" size="+4" color="blue">This
is some text</font></p> You should note that color uses the American spelling and the attribute values are inside double quotes. It looks like this This is some text This is some text Text can be formatted to display as bold or italic. Here is an example <p><b>This text is bold</b></p> It is important when combining more than one tag type that they are properly nested as illustrated in the above example. Alternatives to the <b> and <i> tags are <strong> and <em> (for emphasis) respectively. It looks like this. This text is bold This text is italic This text is bold and italic Text alignment Text alignment can be controlled using alignment tags Here is an example <p align="left">This text is left justified</p> It looks like this This text is left justified This text is centred This text is right justified Lists Lists are simple to do in html. The two main types of lists are ordered (i.e. numbers) and unordered (i.e. bulleted) Here is an example of an ordered list <ol> It looks like this
Here is an example of an unordered list <ul> It looks like this
Linking to other pages What makes html so useful is the ability to make links from one html document to another. links are defined using anchor tags <a> and </a>. Here is an example <a href="http://www.google.com.au">Here is a link to Google</a> It looks like this Adding graphics To finish we will look at how you can include graphics in your web page. The image tag allows you to include a number of attributes such as alignment, alternative text for text only browsers. The two most common formats for image files are gif and jpeg. Here is an example <img scr="logo25.jpg" align="left" alt="Frying Pan"> This is how it looks ![]() This image is left aligned. This means that text will align with the right side of the image.
Where to from here Only a small subset of what can be done with html has been covered here. There are numerous tutorials on html available on line. Here is a list of tutorials suitable for beginners you might want to look at.
|
||
| |