HTML style Tag
HTML style Tag
The style tag is used for styling the document. Inside it, we specify how HTML elements will be shown on the webpage or in other words rendered in the browser. To link a CSS file to our webpage, we use a link tag. The browser actually reads the entire CSS file and then styles each element according to that CSS file. If multiple CSS files are present and each propagates its own version of style for the same element then the styles from the last one will be considered.
Attribute Explanation:-
Attribute | Value | Description |
---|---|---|
media | media_query | Specifies what device media resource is optimized for. |
type | text/css | Specifies media type of the style tag. |
Syntax:-
Its syntax is:- < style >