CSS Semantics

Semantics The semantics of the css in the css implies a right, but rather use the name korektnoe classes. And also use the classes only when necessary. Use css classes to the case when there is no the tag css (X) HTML. Thoughtful, semantically korektno named classes and ID can help set up (X) HTML document for future change and the ability to store data in XML, which can be configured differently. Do not call object (id or class), so what it looks like or where it is used. Examples of class names and ID, which are not semantic: YellowText Blue14pxArial FloatRight LeftColumn MiddleColumn RightSideSpace Use of these names is meaningless, because who would not rule styles the site the future can change the styles described in this class that privedetk absurdity. For example: The developer for the text defined a class of yellow YellowText, and in the future when a site redesign, the text color changed from yellow to blue, resulting in we have a class with a certain YellowText blue.

That in itself is absurd. Therefore, when choosing the name class should not be guided by certain styles within a class, and class assignment. Examples of semantic class names and ID: Header Footer NavigationLocal NavigationGlobal Content Tools Warning Address Instructions Author Copyright Description Summary Do these names there is a certain level of abstraction. You can use these uncertain times and still have only one external description of the css. In this case you do not need to rewrite the class name if you decide to change the style. Editing styles, without changing the class name in css and (x) html document expresses the semantic content of the rock container without contaminating its information specific for only one context. One of the most important capabilities of css – change the style without changing the very (x) html document.

Use function names for their classes and ID; avoid names that describe the style, not funktsianalnost. Another important factor is the semantic css that use classes and ID is not always necessary. If every paragraph on the page will have the same style, it is not needed for each section, add a class with a description of the style enough to register for the entire section on the page. The main conclusions of this article: Classes and IDs (ID) should be used only when there is a need. Name classes and IDs (ID) should describe the functionality rather than style uses an identifier (ID) in those cases when it is necessary to define a unique style for a page, and the class – when you need a class ispolvat several times on a page.

Categories: General, Uncategorized Tags: Tags: ,