Style Tag

Style tag are used for define CSS styles required for the page. It must be inside the tag. The <styletag is used to define style information for an HTML document. Inside the <style> element you specify how HTML elements should render in a browser. Each HTML document can contain multiple <styletags.

EXAMPLE

In this example we use style tag which is another type of css.

<html>
<head>
<title>Style tag</title>
<style>
.code
{
color:hotpink;
}
</style>
</head>
<body>
<p class=”code”>This is my first Html code.</p>
</body>

</html>

style-tag--in-html

OUTPUT

This is my first Html code.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu