style
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
style
グローバル属性は、要素に適用する CSS スタイル宣言を指定します。なお、スタイルは別のファイルで定義することが推奨されます。この属性と <style>
要素の主な用途は、例えばテストのために、すばやくスタイルを適用できるようにすることです。
試してみましょう
メモ:
この属性は、意味的な情報を伝えるために使用してはいけません。すべてのスタイルが削除されたとしても、ページは依然として意味的にが正しくあるべきです。特に、無関係な情報を隠すために使用しないようにしてください。これには hidden
属性を使用してください。
仕様書
Specification |
---|
HTML # the-style-attribute |
CSS Style Attributes # style-attribute |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
style |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
関連情報
- すべてのグローバル属性