Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The class attribute is a very important concept for writing efficient web pages. A class attribute specifies one or more classes for an element, usually to apply a common CSS styling or Javascript behaviour to an element.

This uses Separation of Concerns as you can group together elements that share similar characteristics and apply styles or scripts to all of them at once.

For example, you may have a BUTTONstyle class for styling and a DASHboardAddComponent class for the javascript behaviour:

<div class="BUTTONstyle DASHboardAddComponent">

Like in the Translator with Lua, we recommend with CSS and Javascript Using prefixes for naming code to organize and simplify your overall code.

  • No labels