Example

Style Tag in HTML

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Style Tag in HTML</title>

    <!-- Styling of the website within the style tag -->
    <style>
        h1 {
            background-color:indigo;
            color: white;  
        }

        p {
            text-align:justify;
            border: 2px solid indigo;
        }
        
        span {
            color:blue;
            text-decoration: underline;
        }
    </style>
</head>
<body>
<!-- 
    <style> : used to define styling (CSS - Cascading Style Sheets ) of a webpage.
-->
    <h1>Demo: Style Tag in HTML</h1>
    
    <p>Lorem ipsum dolor sit amet <span>consectetur adipisicing</span> elit. Quae voluptates deleniti accusantium aperiam? Impedit, vitae. Molestiae accusantium dolorum ipsa porro eveniet vero hic perferendis deleniti quod! Incidunt nemo dignissimos sit corporis eius recusandae placeat sint voluptatem sapiente enim nesciunt culpa blanditiis, tenetur impedit esse quibusdam quos temporibus cum fugit architecto.</p>

</body>
</html>

Output

View original