HTML Basic

HTML Basic

HTML document

As described above, HTML document is very simple to write using a text editor on your PC.HTML document contains further topics that include the following:

1. Head

The HTML document head is basically an element of the document. This element contains all information about the document or the text. It is much like the title element which will be discussed later in this section.

2. Title

The title should be short and comprehensive as it will be displayed at the top of the text. It describes all information about the text therefore, the title should be descriptive. Title is sometimes or very often used as references. Title appears at the title bar and the heading is the first element of document written before the text, this is the main difference between a title and a head.

3. Paragraphs

The tag <p>shows the starting of the paragraph and the tag </p> determines the end of a paragraph. In between these tags the content of the paragraph is written. It is recommended that we should put <p> at the beginning of the paragraph to make it easy for the reader that this is the actual material. Sometimes in HTML, we do not use the ending tag </p> after the paragraph, this is optional.

Images

In HTML, we can add images using the IMG element. The syntax is as follows:

<IMG SRC = “untitled.png” >

Where SRC is the source file for the image.

Alignment of images with text

In an HTML document we can align the image in 3 ways. These alignments can be specified by Align attribute this will be discussed in the next section. However we can take 3 possible values to align the image using Align attribute. They are as follows:

  1. ALIGN = top
  2. ALIGN = bottom
  3. ALIGN = middle

The ALIGN = bottom is default. The first one aligns the top image with the text written with it at the top. The ALIGN = middle aligns the middle image with the bottom of the text and ALIGN = bottom aligns the image and the text that is written at the bottom.

Links

The links in HTML document can be added by using the following method:

<A> HREF = “asd.html”> links </A >

Where asd.html is the name of another HTML document and links is the link of this document. This is written in between the tag <A> and the ending tag </A>. HREF is an attribute.