Learning HTML Basics



INTRODUCTION
HTML pages are used for specifying web page content. They contain information and instructions to web browsers that inform them of what to display, and how it should be displayed. It is a simple format, easily learnt, and can support a number of media devices, such as sound, graphic images, and video.
HTML documents are ASCII files, and are created using a simple text editor (or an editor like Front Page). With a text editor, you cannot see what the code looks like in the browser, unless you save the page and then load it into the browser for viewing. WYSIWYG (What you see is what you get) editors like Front Page allow you to view the page as it is constructed in the editor window.
One advantage of using a simple text editor is that you have more control over the HTML code; the disadvantage is you must know the code and have a picture in your mind as to what it looks like. Another disadvantage is since HTML is becoming more complex, it is harder to write, and sophisticated editors like Front Page support the advanced features making it easier for you to implement them.
HTML is a series of tags enclosed in < and > brackets. For instance, <HEAD> is an HTML tag that defines a head section of an HTML document. Certain characters are reserved, such & < > which are interpreted as HTML codes.
Each HTML page adheres to a basic structure. This looks like
<html>
<head>
<title>Title of Document</title>
</head>
<body>
Textual Information to be displayed
</body>
</html>
When viewed in the browser, this page looks like,
Textual Information to be displayed
_____________________________________________________________________________________
 HTML TAGS
HTML codes are not case sensitive. Most HTML tags need an end-tag to end it. An example of an HTML tag is <HEAD>, and the end tag for this is </HEAD>.
____________________________________________________________________________________
 BOLD TYPE
The BOLD print tag starts with <B> and ends with </B> so that all text in-between the tags is printed in bold.
Example of using the bold tag
    * the source in the HTML page looks like
      <B>This is bold text</B> and this is not.
    * the resultant output by the browser looks like
      This is bold text and this is not.
_____________________________________________________________________________________
 SPACES, TABS AND FORMATTING
Newlines, spaces and tabs are ignored (single spaces accepted).
Example of spaces in the input text
    * The source in the HTML page looks like
                 This line    contains    heaps of spaces.
    * The resultant output by the browser looks like
                  This line contains heaps of spaces.
To format text literally, the <PRE> and </PRE> tags are used. This is how the above line that contains all the spaces was inserted into this document.
_____________________________________________________________________________________
 LARGE SIZE TEXT
There are 6 header sizes, from H1, the smallest, to H6, the largest. The HTML tags <H1> to <H6> are used to define the size of text. The normal size is about <H2>.
Examples of using the <H.> tag to implement larger style text
    * The source in the HTML page looks like
      <H3>This is header size 3</H3>
    * The resultant output by the browser looks like
      This is header size 3
_____________________________________________________________________________________
 ITALIC TEXT
The ITALIC print tag starts with <I> and ends with </I> so that all text in-between the tags is printed in italics.
Example of using the italics tag
    * The source in the HTML page looks like
      <I>This is italic text</I> and this is not.
    * The resultant output by the browser looks like
      This is italic text and this is not.
_____________________________________________________________________________________
 A PAGE TITLE
A page title, specified on an HTML page, appears in the title window of the browser.
    * add a title which appears in the title bar of the browser
      <TITLE>This appears in the title window</TITLE>
_____________________________________________________________________________________
 A HORIZONTAL DIVIDER
This is used for breaking pages up, by separating sections using a horizontal line.
    * The source in the HTML page looks like
      <HR>
    * The resultant output by the browser looks like
_____________________________________________________________________________________
In addition, a number of effects can be applied to a horizontal rule, such as color, size and width tags.
    * The source in the HTML page looks like
      <HR size=4 width=50% color=RED>
    * The resultant output by the browser looks like                                                                                                                       _____________________________________________
_____________________________________________________________________________________
 ADDING IMAGES
Graphic images are added to an HTML page using the <IMG> tag.
    * The source in the HTML page looks like
      <IMG SRC="icon.gif" > This is an icon
_____________________________________________________________________________________
 LINKING TO OTHER PAGES
This is called a hyper-link. It shows up in the document as underlined text, and allows the user to load another page.
    * The source in the HTML page looks like
      <A HREF="basichtm.htm">Go to next page</A>
    * The resultant output by the browser looks like
_____________________________________________________________________________________
 FONT SIZES, FACES AND COLOR
You can specify the font face, size and color using the <FONT> tag. Some systems may not have the desired font installed on their system.
    * specify font size and color and type of font, the source in the HTML page looks like
      <font face="Comic Sans MS" size=4 color=green> Hello There </font>
    * the resultant output by the browser looks like
                                                                                           Hello There
_____________________________________________________________________________________
 BACKGROUND IMAGES
An image (.gif or .jpg) can be used as a background. It should be reasonably pale so as not to distract from the displayed information.
    * The source in the HTML page looks like
      <body background="../backgnds/blue_pap.gif">
You can also specify a background color rather than an image. The sixteen basic colors are AQUA, BLACK, BLUE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, PURPLE, RED, SILVER, TEAL, WHITE, and YELLOW.
    * The source in the HTML page looks like
      <BODY BGCOLOR="WHITE"> _____________________________________________________________________________________
 BACKGROUND SOUNDS
A background sound is loaded and plays when the HTML page is loaded by the browser. The HTML tag <BGSOUND> specifies the filename to play (which is generally a .wav file for window systems), whilst the LOOP statement specifies the number of times to play the sound.
    * The source in the HTML page looks like
      <bgsound src="../sounds/Whales.wav" loop="1">
_____________________________________________________________________________________
 IMAGES AS HYPERLINKS
It is common to use little pictures or Icons as links to other pages, for example, the little red up triangle's used in this document are used as hyperlinks to the top of this page.
    * The source in the HTML page looks like
      <a href="basichtm.htm"><img src="icon.gif" width="57" height="40" border=0 alt="Click here"></a>
_____________________________________________________________________________________
 EMBEDDED VIDEO
Some browsers such as Internet Explorer support video embedded on the HTML page. The <IMG> tag is extended to include DYNSRC which specifies the location of the video file, LOOP which specifies how many times to play, and START, which specifies how the movie will play (MOUSEOVER or FILEOPEN).
    * The source in the HTML page looks like
      <IMG SRC="../videos/avi/cit_stuff/surface.jpg" DYNSRC="../videos/avi/cit_stuff/surface.avi" LOOP=2 START=MOUSEOVER width=240 height=180  alt="Rise">
You should be aware that browsers that do not support embedded video need the SRC statement so a graphic image is displayed if the movie file is not found or is not supported.
_____________________________________________________________________________________
 Using the Reserved Characters & < > as text
As was stated earlier, the characters & < > are reserved to implement HTML tags. To use these as text requires the use of a special code sequence,
HTML Tag    Resultant Output
&amp;                                            &
&lt;                                                    <
&gt;                                                 >
&copy;           ©                             ©
&quot;                                            "
&nbsp;                            Inserts a space
&reg; ®                               ®
_____________________________________________________________________________________
Embedding a video or sound object
One of the problems of using the background sound tag is that is it only supported by Internet Explorer. To use video and sound that will play in both Netscape Navigator and Internet Explorer, use the EMBED tag. It's format is shown below.
<embed src="../../sounds/intro2.wav" border="0" width="145" height="60" autostart="TRUE"> </embed>
The src is the path to the object, the height and width is the screen space allocated to displaying the object.
_____________________________________________________________________________________

கருத்துகள்

இந்த வலைப்பதிவில் உள்ள பிரபலமான இடுகைகள்

புதுக்கவிதை +ஐக்கூ +சென்ரியூ+லிமரைக்கூ ---ஒரு பார்வை

My resignation as an adult

துறவறம் துறந்த துறவியின் கதை !