Search
Left Quote    I start where the last man left off.
- Thomas A. Edison    
Right Quote
 
[login] | [Register]
 

HTML Tutorial

by: ranjith
Page: 3 of 5
(View All)


Paragraphs


Paragraphs 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 Formatting


In 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:

  • Verdana
  • Arial
  • Helvetica

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 breaks


Line 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 breaks
that is why it is divided
in three.

Body Attributes


HTML 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”>

Links


If 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:




1  |  2  |  3  |  4  |  5  |  
Next »


No Comments for this page.

You Must be logged in or a member to comment.


Tutorial Stats

Tutorial Stats

1,881 Views
0 Total Comments
0 Rating of 5 ( Votes)

Options

Tutorial Options

· Login to Rate This Article
· Login to Post a Comment
· Read more by this author
Digg This Article! Del.icio.us: Bookmark This Article Reddit: Bookmark This Article BlinkList: Blink This Article! YahooMyWeb BlogMarks: Add This Mark! Furl: Save This Article Spurl: Mark This Article

Articles

Related    

· New windows without using the target attribute
· Site Design Made Simple
Your Article Here


"AllSyntax.com" Copyright © 2002-2012; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank