Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

style

This article needs an editorial review. How you can help.

L'atribut global style contè declaracions d'estil CSS per ser aplicat a l'element. Fixeu-vos que es recomana definir els estils en un fitxer o fitxers diferent. Tant aquest atribut com l'element <style> tenen principalment la finalitat de permetre aplicar estils de forma ràpida, per exemple per propòsits de testeig.

Nota d'ús: Aquest atribut no s'ha d'utilitzar per transmetre informació semàntica. Fins i tot en el cas que s'eliminin tots els estils, la pàgina hauria de remandre semànticament correcta. No s'hauria d'utilitzar per amagar informació irrellevant; si aquest és l'objectiu, s'hauria d'utilitzar l'atribut hidden.

Especificacions

Especificació Estat Comentaris
WHATWG HTML Living Standard
The definition of 'style' in that specification.
Living Standard Cap canvi des de l'última instantània, HTML5.1
HTML5.1
The definition of 'style' in that specification.
Working Draft Instantània de WHATWG HTML Living Standard, cap canvi desde HTML5
HTML5
The definition of 'style' in that specification.
Recommendation Instantània WHATWG HTML Living Standard. A partir de HTML 4.01 Specification, és un atribut global vertader.
HTML 4.01 Specification
The definition of 'style' in that specification.
Recommendation Suportat en tots els elements excepte:<base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>.
CSS Style Attributes Recommendation Es defineix el contingut de l'atribut style.

Compatibilitat amb navegadors

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic (Yes) (Yes) (Yes) (Yes) (Yes)
Característica Android Chrome per Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

Vegeu també

Document Tags and Contributors

 Contributors to this page: llue
 Last updated by: llue,