Getting Started with CSS

To start coding CSS, you just need two components – A text editor and a web browser.

Creating an CSS document

Open the text editor that you have on your computer. (Notepad, TextEdit, or gEdit)  Click on File. Click on New.

Type the following code:                                                          

< html &rl; < head &rl;     < title &rl; Learning HTML < /title &rl; < /head &rl; < body &rl;     < p &rl;I am making my first HTML program!< /p &rl; < /body &rl; < /html &rl;

Saving an HTML document

  1.  Click on File> Save As. The Save As Dialog box appears.

  2.  Specify the location and type the name of the file.

  3.  Specify the extension .html or .htm. Click OK.

  4.  The file will be saved.

Tip:

If you don’t specify the extension in the text editor, the file will be saved as .txt.

Opening an HTML document

Browse the location of the document. Double click. It will open the HTML document in the default web browser of your computer.

Tip:

The content that you enclose between the <title> and </title > tags are visible on the title bar of the web browser.