Create a Simple CSS Stylesheet Using Notepad

Notepad is one of the text editors that you can use to create a Cascading Style Sheet (CSS) document. After you create a CSS file from the Notepad, you can link this file to your Web pages so that the content of your Web pages can be formatted by your stylesheet.

Steps

  1. Open Notepad.
  2. Copy the code in the reference to the right. [1]
  3. Paste the code onto Notepad.
  4. Save the Notepad file. Save it to "SimpleCSS.css" by clicking "File" and select "Save." A "Save As" dialog blox is displayed after you click "Save."
  5. Name your CSS file. Type "SimpleCSS.css" or any name you want into the "File Name" text box with the ".css" extension.
  6. Click the "Save" button.

Tips

  • Save your Notepad file as Text Only (sometimes it might be called Text Document or ASCII) and give it the ".css" extension.
  • Be sure to put your saved CSS document at the same folder as your html documents where you created your Web pages.
  • The code written here is only an example to show you how to create a basic CSS file using Notepad to control the html elements in the example Web page displayed at the introduction section. You can alter the CSS coding however you want it in order to format the styles and looks of your Web pages.
  • After you are done creating the CSS document, you may need to take the next step; that is, linking the document to your Web pages. Please follow the related articles in order to do so.

Things You’ll Need

  • A computer
  • Notepad program
  • An Internet browser

Related Articles

Sources and Citations

You may like