Elements – Style Tag

Style Tag

The style tag is used sort of like a css file except inside of an HTML, like so:

<head> <title>Your Title</title> <style> p { color:red; } </style> </head>

That would make the paragraph tag’s color red. It is kind of useful if you just want to put a little bit of code, but if you want a really long stylesheet, then I recommend just using <link />.

More Information:

W3C schools

More Info:

Style tag is used to set any CSS-styles for web-page inside a document. Style tag should be nested within head section of html-document:

<head> <style> h1 { text-align: center; font-family: sans-serif; } </style> </head>

You can write any CSS-code inside style tag according to its syntax.

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.