Tag Style
Written
Author
CSS tags are also known as elements or selectors. They have a basic layout very similar to regular HTML tags.
Regular HTML tag
CSS command tag element
One of the main differences is the use of the { } brackets instead of the < > brackets.
The ELEMENT can be a normal HTML tag, an id, or a class.
The PROPERTY and VALUE are the same form as the HTML tags.
Tag Elements
Tag elements are very similar to regular HTML tags. Here is an example showing some regular text being formatted in a red color :
HTML
HTML4 n CSS
The outcome is the same. The above example shows how to use the inline style CSS, where the command is actually part of a normal HTML tag. That will help on individual instances, but when you want ALL the text within all <p> area to be red, you can use the embedded style CSS. This places the CSS command into the HEAD area of the code.
HEAD area
BODY area
All of the text within the <p> tags on that page will be affected by the CSS command, making them red. Any text outside of a <p> area will not be affected.
Table of Contents
Table of Contents