Text Formatting Tags
Text Formatting Tags In the...
https://things-for-students.blogspot.com/2011/10/text-formatting-tags.html
Text Formatting Tags
In the following table, some Text formatting tags are listed:
Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<h1> to <h6> Defines header 1 to header 6
<p> Defines a paragraph
<br> Inserts a single line break
<hr> Defines a horizontal rule
<!--> Defines a comment
<b> Defines bold text
<big> Defines big text
<i> Defines italic text
<small> Defines small text
<sub> Defines subscripted text
<sup> Defines superscripted text
<strike> Deprecated. Use <del> instead
<u> Deprecated. Use styles instead
Character Entities:
Some characters have a special meaning in HTML, like the less than sign (<) that defines the start of an HTML tag. If we want the browser to actually display these characters we must insert character entities in the HTML source.
A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (;).
To display a less than sign in an HTML document we must write: < or <
The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.
Note that the entities are case sensitive.
The Most Common Character Entities:
Result Description Entity Name Entity Number
Non-breaking space  
< Less than < <
> Greater than > >
& ampersand & &
? Quotation mark " "
' apostrophe '(does not work in IE) '
Some Other Commonly Used Character Entities:
Result Description Entity Name Entity Number
© Copyright © ©
® registered trademark ® ®
£ pound £ £
The Anchor Tag and the href Attribute:
HTML uses the <a> (anchor) tag to create a link to another document.
An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc.
The syntax of creating an anchor:
<a href="url">Text to be displayed</a>
The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.
This anchor defines a link to a blog:
<a href=”http://www.durgapuja-inpic.blogspot.com” target=”_blank” >Visit My Blog</a>
With the target attribute, you can define where the linked document will be opened. The above line will open the document in a new browser window. There are four values for target attribute. i.e.
- _blank - the target URL will open in a new window
- _self - the target URL will open in the same frame as it was clicked. Frame will be discussed later.
- _parent - the target URL will open in the parent frameset
- _top - the target URL will open in the full body of the window