The <style> tag is used to declare style sheets within the head of HTML document. Inside the <style> element you specify how HTML elements should render in a browser. Each HTML document can contain multiple <style> tags.
Attribute | Value | Description |
media | media_query | Specifies what media/device the media resource is optimized for |
scoped | scoped | Specifies that the styles only apply to this element’s parent element and that element’s child elements |
type | text/css | Specifies the media type of the <style> tag |
<html>
<head>
<title>html_style</title>
</style>
</head>
<body style="background-color: rgb(180, 221, 67);">
<h1 style="text-align: center;">Style tag</h1>
<p style="margin-bottom: auto;">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, nobis.</p>
<hr>
<br>
<p style="color: blue;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Fuga, eligendi?</p>
</body>
</html>
Latest posts by vikashdev k (see all)
- PHP OOP: Traits - October 25, 2021
- PHP OOP: Late Static Binding - October 25, 2021
- PHP OOP : Static Members - October 23, 2021