deprecated

Please click here to view the Brochure

The class attribute, on the other hand, assigns one or more class names to an element; the element may be said to belong to these classes. A class name may be shared by several element instances. The class attribute has several roles in HTML: As a style sheet selector (when an author wishes to assign style information to a set of elements). For general purpose processing by user agents. In the following example, the SPAN element is used in conjunction with the id and class attributes to markup document messages. Messages appear in both English and French versions.

Variable declared twice

Undeclared variable

Bad syntax for variable name

Variable déclarée deux fois

Variable indéfinie

Erreur de syntaxe pour variable The following CSS style rules would tell visual user agents to display informational messages in green, warning messages in yellow, and error messages in red: SPAN.info { color: green } SPAN.warning { color: yellow } SPAN.error { color: red } Note that the French "msg1" and the English "msg1" may not appear in the same document since they share the same id value. Authors may make further use of the id attribute to refine the presentation of individual messages, make them target anchors, etc. Almost every HTML element may be assigned identifier and class information. Suppose, for example, that we are writing a document about a programming language. The document is to include a number of preformatted examples. We use the PRE element to format the examples. We also assign a background color (green) to all instances of the PRE element belonging to the class "example".

Erreur de syntaxe pour variable The following CSS style rules would tell visual user agents to display informational messages in green, warning messages in yellow, and error messages in red: SPAN.info { color: green } SPAN.warning { color: yellow } SPAN.error { color: red } Note that the French "msg1" and the English "msg1" may not appear in the same document since they share the same id value. Authors may make further use of the id attribute to refine the presentation of individual messages, make them target anchors, etc. Almost every HTML element may be assigned identifier and class information. Suppose, for example, that we are writing a document about a programming language. The document is to include a number of preformatted examples. We use the PRE element to format the examples. We also assign a background color (green) to all instances of the PRE element belonging to the class "example".

hello

Erreur de syntaxe pour variable The following CSS style rules would tell visual user agents to display informational messages in green, warning messages in yellow, and error messages in red: SPAN.info { color: green } SPAN.warning { color: yellow } SPAN.error { color: red } Note that the French "msg1" and the English "msg1" may not appear in the same document since they share the same id value. Authors may make further use of the id attribute to refine the presentation of individual messages, make them target anchors, etc. Almost every HTML element may be assigned identifier and class information. Suppose, for example, that we are writing a document about a programming language. The document is to include a number of preformatted examples. We use the PRE element to format the examples. We also assign a background color (green) to all instances of the PRE element belonging to the class "example".Erreur de syntaxe pour variable The following CSS style rules would tell visual user agents to display informational messages in green, warning messages in yellow, and error messages in red: SPAN.info { color: green } SPAN.warning { color: yellow } SPAN.error { color: red } Note that the French "msg1" and the English "msg1" may not appear in the same document since they share the same id value. Authors may make further use of the id attribute to refine the presentation of individual messages, make them target anchors, etc. Almost every HTML element may be assigned identifier and class information. Suppose, for example, that we are writing a document about a programming language. The document is to include a number of preformatted examples. We use the PRE element to format the examples. We also assign a background color (green) to all instances of the PRE element belonging to the class "example".