What is HTML?
Hypertext Markup Language is the “language” used to prepare web pages. It
is essentially the “language” which tells the internet browser how to display
objects on the screen and where and when to get files which need to be inserted
into the page.
How Does it Work?
HTML is not really a language in the programing sense of the word. It consists
of matched pairs (usually) of tags, which are placed either side of objects
to define how those objects will be displayed. In each pair there will be an
opening tag and a closing tag.
E.G. <i>TITLE</i> - This will italicise the word “Title”
The < > characters indicate a Tag and the addition of the / indicates
an end Tag and the letter(s) indicates the name of the tag.
How do I Write HTML?
There are many ways:
The simplest in terms of software requirements and used by many Web Designers
is to write it using a simple text editor like notepad or a word-processor
will do, so long the file is saved as text only.
HTML can also be written with text-based authoring software. The programs
are often available free or shareware although the best costs over $100. They
allow the user to code the page manually, but have many features to automate
the most common or repetitive tasks.
Using both the above is awkward because you can’t see the web page itself.
If you use Notepad, you will need to have at least one internet browser running
so that you can save your file, switch to the browser and load the page to see
the changes. The programs will have a viewer to alow you to examine your handiwork
WYSIWYG web authoring software is the simplest method. Some software
of this type is available free (Netscape Composer included with Communicator)
whilst the best, Dreamweaver, costs hundreds of dollars. They allow you to code a page with
no knowledge of HTML and you see the changes as they happen rather like desktop
publishing. They allow drag and drop for placing objects in the page, which
makes life simple. There are no true WYSIWYG tools as each web browser displays the
page slightly differently!!
Office suites these days allow documents to be created and saved as web pages.
This makes web pages easy to prepare but limit the designer to the features
offered by the package, which is really intended for a different purpose. To
prepare really attractive and interesting pages you would need add HTML code
by another method to exploit features not supported by the software.
Word does a good job for a word processor, but the files are very large compared
to identical hand coded pages and Word only offers limited features.
Why Code Pages Manually When There Are Easier Ways?
All web authoring tools have limitations which arise from the nature of web
pages and users PCs. Some will not give total flexibility in page design whilst
others produce inefficient code, which will slow down page loading. Even Dreamveaver or Front Page will not always allow you total control unless you can modify the code yourself.
So many web authors still code manually.
It is essential to have some knowledge of HTML if the most effective, efficient
and attractive pages are to be written.
Writing HTML Code
HTML tags define all the formatting in web pages which is rather useful since
any carriage returns or spaces (except for one between each word) will be ignored
by the internet browser and therefore not displayed in the web page. You can
therefore space out the code in order to make it easier to follow. The browser
must be able to interpret the tag itself so the name of the tag and any parameters
must be complete and unbroken.
Any unrecognised tags will be ignored. This is useful as older browsers do not
understand the newer tags. However, tags must be paired or the browser will
mistake them for text and print them and their parameters to the page.
Remarks may be added (which will also not be displayed) to remind you or others
of what a particular section of code does.
The format of a remark is <!Text content of the remark>
There is no such thing as a web page?
The web page is not one item like a word-processed document. It is a collection
of files. The page itself does not contain the pictures and sounds you may
add, for example. It simply contains a link to the picture/sound file. Thus
when you want to move or copy the page you must move or copy the associated
files also. Should you delete the associated files your page will not display
properly.
Using Notepad
Using notepad to code pages is easy once you know some HTML but a little painful
as you will need to switch to a browser to view the page. The procedure is:
|
To Create the page:
- Start Notepad
- Start your web browser
- Create the page in Notepad
- Save it. Make sure the "Save as type" is set to All Files
and your file name ends with .htm or .html
- Switch to the web browser and open the page
|
|
|
To Edit the page:
- Leave both the browser and notepad open while you work on the page
- Edit the page in Notepad
- Save
- Switch to your web browser
- Refresh/reload the page to see the changes
- Return to Notepad to make further changes and repeat the procedure
|
Should the browser fail to load the new version
(as it keeps a copy of the page in its cache on the hard disk) press Shift
and reload/refresh at the same time, which forces the browser to get a new
copy of the page. |
|