Friday, April 4, 2008

Line Break & Comment in HTML

Line Break:
The "br" tag is used when you want to break a line, but don't want to start a new paragraph. The "br" tag forces a line break wherever you place it. Like -
Comment in HTML:
The comment tag is used to insert a comment in the HTML source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.

Note that you need an exclamation point after the opening bracket, but not before the closing bracket.

Sunday, March 9, 2008

Tags

Headings:
Headings are defined with the h1 to h6 tags. h1 defines the largest heading & h6 defines the smallest heading.
HTML automatically adds an extra blank line before and after a heading.

Paragraphs:
Paragraphs are defined with the p tag.

HTML automatically adds an extra blank line before and after a paragraph.

Remember don't forget closing tag like:

Basic HTML Tags

The most important tags in HTML are tags that define headings, paragraphs and line breaks.

The best way to learn HTML is to work with examples. We have created a very nice HTML editor for you. With this editor, you can edit the HTML source code if you like, and click on a test button to view the result.

Try it your self : -

Output : The content of the body element is displayed in your browser.

Example-2:

Output:
This is a paragraph.
This is a paragraph.
This is a paragraph.
Paragraph elements are defined by the p tag.

Saturday, February 16, 2008

File Extension........

HTM or HTML Extension?
When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letter extensions.
With newer software we think it will be perfectly safe to use .html.

Introduction to HTML..........

What is an HTML File?
1.HTML stands for Hyper Text Markup Language
2.An HTML file is a text file containing small markup tags
3.The markup tags tell the Web browser how to display the page
4.An HTML file must have an htm or html file extension
5.An HTML file can be created using a simple text editor

Do You Want to Try It?
If you are running Windows, start Notepad.
If you are on a Mac, start SimpleText.
In OSX start TextEdit and change the following preferences: Open the the "Format" menu and select "Plain text" instead of "Rich text". Then open the "Preferences" window under the "Text Edit" menu and select "Ignore rich text commands in HTML files". Your HTML code will probably not work if you do not change the preferences above!
Type in the following text:

Save the file as "mypage.htm".

Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.