A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/attributes/style below:

style ยท WebPlatform Docs

style Summary

Sets an inline style for the element.

Applies to dom/HTMLElement

This attribute is used to set styling in the form of [CSS rules](/guides/getting_started_with_css#Defining_style_rules) to an element.

Examples
<!doctype html>
<title>HTML Style Attribute Usage</title>
<p style="background-color: blue; color: white;">This will be white text with a blue background.</p>

View live example

Usage
 While this is perfectly valid, it is *highly* recommended by the community at large that you not use inline styles. Instead it is much better to simply target the element you want in your CSS and apply rules in there.
Notes Remarks

This attribute is not accessible through scripting. To access styles through scripting, use the style object.

Related specifications
HTML4 Specification
W3C Recommendation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4