![]() |
|
||||||
ParagraphsParagraphs are probably one of the most inevitable parts of a document. The HTML provides you the <p> tag to add paragraphs to a document. The closing tag is </p> but it is optional. Example:Text FormattingIn order to make your web page look striking you need to format your textual content suitably, HTML offers a significant number of formatting tags for this need. <b> and </b> for bold, <i> and </i> for italics <u> and </u> for underlined and <tt>and </tt> for typewriter are the normally used formatting tags. Developers can make a sentence displayed using a particular font and size using the <font> </font> tag. This is accomplished by adding the face=”font-name” and size=”2” attribute to the <font> tag. The most commonly supported fonts are:
You can also change the color of a sentence by setting up the color property in the <font> tag. The color is set using the hexadecimal system (#000000). Color could also be set in latest browsers by using the normal name of the colors (Red for Red, Green for Green, etc.) Examples:Typewriter style Underlined A Red Sentence Line breaksLine breaks are used to force a sentence to print on another line. Since html and your text cohabit in a single file, there is no way for the web browser to identify a line break. So in order to break a line in the middle you have to use the <br> tag. See example below: This sentence contains 2 line breaksthat is why it is divided in three. Body AttributesHTML also provides you ‘tools’ to change the appearance of the background settings of a webpage. The tag you use to change the settings of a web page is the <body> tag. You can change the color or set a background image by adding appropriate attributes to the body tag. Ex: If you want to load an image as the background of your page you need to add the background attribute to the body tag: <body background=”test.jpg”>If you want to change the background color of the web page you need to add the bgcolor property: <Body bgcolor=”#000000”> LinksIf you want to add a link to a particular website from your web page you need to make use of the anchor tag <a href=”location”></a>. Whatever appears between these two tags will become underlined and colored, and if you click on the underlined text the browser redirects you to the specified website. If you specified the target attribute in the tag then the link will be opened in a new browser window. You can also make the anchor tag behave in such a way that, if clicked it will send email to certain person. For this purpose you need to put the email address of the person you wish to send the mail in the following format: The above HTML statement when viewed in a browser would look like: Someone If you click the link the default email software (such as Microsoft outlook) should come up with the ‘someone@thewebsite.com’ pasted at the ‘to’ field. Format for a link to crystalgraphics website would look like this: Here is a link to the crystalgraphics website if it is to be opened in a new window:
No Comments for this page. |
|
||||||||||||||||||||||||||||||||