Formatting, in the world of computers, is the process of defining layout, applying fonts, font size and color for making text readable and look attractive. The formatting plays an important role in attracting the attention of users or website visitors. HTML formatting is done taking in the type, age and gender of the end user. The formatting is applied on a block of text or individual lines of text.
Types of tags for HTML Formatting
Depending on how the tags are used in formatting, HTML formatting tags are classified as –
Physical HTML Formatting Tags
The physical formatting tags are used to define the presentation of characters of text displayed on the web page. With these tags the browser will know that what appearance the characters will have on the page.
Logical HTML Formatting Tags
As the name describes the logical formatting tags, irrespective of its formatting, tell the browser how the text is been used in the web page.
Common attributes of HTML Formatting
Both type of HTML formatting have certain commons set of attributes. The attributes are used to enhance the appearance and functionality of tags. The following are the common attributes of HTML formatting
ID
ID means identifier. The HTML tags can be made interactive by using scripting language like JavaScript. For that ID attribute can be set. ID attribute is set as an alphanumeric identifier. Each HTML tag if given an ID it must be unique to get it identified.
CLASS
Class is a named and defined set of attributes in a stylesheet to be applied to a tag. This way of styling the tags elements allows you to standardize the looks and working of a website.
STYLE
This attribute is used to apply the style to one single element of an HTML page. When you use this attribute you need to specify list of styling options as CSS attribute and value pairs.
TITLE
The HTML elements like form input and other element must convey its purpose and meaning to users. In software applications Tooltip text or Title are the way to do this. TITLE attribute can be assigned text that conveys its meaning. It also appears as a tooltip text whether user rests the mouse cursor on the HTML element.
DIR
DIR means direction. This attribute defines the direction of non- aligned text. The two allowed values are LTR (left to right) and RTL (right to left)