<style> HTML tag

In this article we will discuss about how to use the style tag in HTML.
  • 1719

The style tag in HTML is used for specifying the style sheet within the HTML head. It is denoted by <style> tag in HTML.

HTML Code:

<html>

<head>

    <title></title>

</head>

<body>

    <style type="text/css">

        h1

        {

            color: purple;

        }

        p

        {

            color: red;

        }

    </style>

    </head>

    <body>

        <h1>

            My level1 heading is of purple color</h1>

        <p>

            my paragraph color is red</p>

    </body>

</html> 

Output:

 tttttttttttttttttttttt.jpg

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.