answersLogoWhite

0

Are there any syntax rules for CSS?

User Avatar

Anonymous

12y ago
Updated: 8/19/2019

Yes. As there are a number of ways of setting up styles, there are some variations. Common to all is that you have to specify the selector, which is the tag you want, a property and a value. The property and value are separated by a colon. The place where you set up style will determine how it is done. In an external or internal style sheet, it would be done like this:

selector {property:value}

P {color:red}

If there is more than one rule being applied to the same tag, they are separated by a semi-colon:

P {color:red; font-size:20pt}

If it is an inline style, then they are not enclosed in braces, but are enclosed in quotation marks.

<p style="color:red">

These are just a few basic rules of syntax, but there are others and ways of doing things.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Is the colon a valid example of CSS syntax?

No, a single colon in itself is not a valid example of CSS syntax.


What are the strict rules of html5?

CSS


What the best tools for removing inefficient rules in CSS?

CSS rules can be removed manually by opening the CSS file. It makes the user decide what to remove.


Are HTML tags and syntax the same?

No. Syntax is/are the rules of the language, tags are part of the syntax.


Which is the correct CSS syntax?

There are many places to learn the correct syntactical parts of the standard which is now CSS 2.1, and CSS 3.0 in the wings. Whole books are dedicated to this subject. I have one that site that uses nothing but version 1.0, but they will degrade gracefully down to Internet Explorer 3, Netscape Navigator 2.02 and pre-Opera 3.6 Links are attached.


A set of Rules that define a programming language is called?

The rules of a language is called its syntax.


What is a custom CSS?

All CSS is custom, that is the purpose behind CSS. It allows you to control the presentation of your web pages and separate the rules that govern presentation from the content and markup. You control what rules you develop and set the rules for. CSS stands for cascading style sheets.


What describes syntax?

the study of the rules for the formation of grammatical sentences in a language - any orderly arrangement or system


Functions are based on rules called?

syntax


Why does a css class not work in fire fox?

CSS classes do work in FireFox. What is the main problem? (specifically)Have you checked that the syntax is correct?There is a lot to learn about things with CSS and browsers, you may need a hack or fix, if all else fails.


Why are the rules called for the organization of language?

The rules for the organization of a language is called syntax.


How can syntax help you in teaching English?

Syntax to the rules and principles that govern sentence structure refers. Difficult it would be to teach (or learn) any language without considerable attention to syntax paying, unless one like Yoda was determined to sound.