Basic of HTML – What is Tags:
Do you know the full form of HTML
HTML tags actually serve two purposes:
- Identify logical document parts.
- Tags can include pointers and links to other documents, images, sounds files, video files, multimedia applications, animations, applets and soon.
All tags are composed of elements that are contained within angular brackets (< >).
The angular brackets simply tell the browser that the text between them is an HTML command/tags.
Nesting tags means placing one set of tags inside another set. For example, to apply italic to a heading, you nest the tags, like this:
<H1><I> Nesting of tags</I></H1> <I><H1>Nesting of tags</H1></I>
While typing tags, particularly be careful not to include extra spaces.
If you do so, a browser me not recognize that tag and will not display the information correctly.
Most of the tags are with an opening and ending tag.
HTML tags are not case sensitive, but generally, Uppercase is used so that they will stand out from the rest of the text.
For improving readability type text in uppercase. Like this
<TITLE>This title tag can be written correctly</TITLE>
Basic of HTML – What is Attributes:
Some tags work in combination with attributes, which provides additional information about an element, such as how an element should align, what other files should be assigned, or even the colour of an element. For example
<H1 ALIGN="CENTER"><I>Using attributes with tag</I></H1>
Where ALIGN is the attribute only in the opening tag.
All attributes go in the opening tag and separated from other attributes in the tag itself by a space. Some attributes required codes, some don’t. For example, you can type ALIGN=”CENTER” or ALIGN=CENTER, all browsers should display this in the same way.
Attributes that have other characters, such as spaces, % signs or # signs, however always require codes. For example WIDTH=”75%”.
Basic Tags of HTML:
The <HTML> tag:
The <HTML> tag identifies the document as HTML.
The <HEAD> tag:
The <HEAD> tag contains information about the document, including its title, scripts used, style definitions, and document descriptions.
The <TITLE> tag:
The <TITLE> tag contains the document title.
The <BODY> tag:
The <BODY> tag include the tags, attributes, and information that you want on a visitor browser to display.
Basic Attributes of <BODY> tag:
- ALINK: ALINK defines the colour of the hyperlink as the user actually clicks them with the mouse.
- LINK: LINK defines the colour in which the hyperlinks will be displayed which has not yet been visited. It changes the default colour of Hyperlink.
- VLINK: VLINK defines the colour of the hyperlinks, which have previously been visited.
- BGCOLOR: BGCOLOR specifies the colour to be used for the background of the webpage. The simple way is to use the name of 16 permitted colours for the RGB colour combination. <BODY BGCOLOR=”RED> or <BODY BGCOLOR=”#FF0000″>
- TEXT: This defines the colour of the text of the page. You can also use our GB.<Body text=Red>
- STYLE: specify stylesheet commands that applied to the document body.
- BACKGROUND: the relative and absolute location of an image file that tile across the document’s background.