CSS syntax

Standalone CSS file has the following syntax for the elements there.

First HTML element needs to be listed.

Following it in curly brackets needed to be listed properties of this object.

Then following colon property needed to be listed values of that property. There could be more than one value there. For example font type to be used. There could be more than one value. If there is more then one value then they need to be separated by comma. In the example of font type to be used if the first font is absent in a system, then next font will be selected.

The property will end with a semicolon, and next property can be listed.

To include a specific CSS file in HTML document the link section is needed to be added to the head section of the HTML file.

href section of that link will point to CSS file that is needed to be used.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator