HTML style tag

Last Updated on April 26, 2023 by Roshan Parihar

HTML style tag is used inside html webpages to include the inline css. The inline css gives styling to the content of the website. The look and feel depends upon the CSS.

Syntax of HTML style tag

Output

This is example using inline style to show the output of CSS.


We can style the HTML element without using <style> tag. Instead of using this tag, we can use style attribute to give CSS.

Output

This is example using inline style without using the style tag.


Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github