Things You'll Need:
- Plain text editor
-
Step 1
Familiarize yourself with a style definition in HTML. A style definition instructs a web browser to render a specific HTML element a certain way every time that HTML element is shown. If for example, a web master wants to portray a string of text in a bold red font but doesn't want to repeatedly re-type the font attributes for every instance of the string, she can define a style for that string instead.
-
Step 2
Start by opening your web page in Windows Notepad. If the file size is too large, you can use WordPad instead. You can also use a web design program like Dreamweaver opened in HTML mode.
-
Step 1
Begin the style tag by typing the following code in the header section of the Web page: < STYLE >
-
Step 2
Decide which HTML element should always use the same formatting (syntax and attributes). Example:< P >, the "paragraph" tag.
-
Step 3
Insert the appropriate style for the HTML element.
P { color : blue;
font-size : 12pt;
font-family : Arial
} -
Step 4
Close the style tag by typing the following HTML code:< /STYLE >. The end result should resemble the following:
< STYLE >
P { color : blue;
font-size : 12pt;
font-family : Arial
}
< /STYLE > In this example, all the text in each paragraph would default to and display as a blue, 12pt Arial font without having to encase the paragraphs in separate font tags.








