Multiple Styles in a Single Style Element - HTML CSS CSS

HTML CSS examples for CSS:Introduction

Description

Multiple Styles in a Single Style Element

Demo Code

ResultView the demo in separate window

<!DOCTYPE HTML>
<html>
    <head>
        <title>Example</title>
        <style type="text/css">
            a {<!--from   ww w  .  j  av  a2s .  com-->
                background-color:grey;
                color:white
            }
            span {
                border: thin black solid;
                padding: 10px;
            }
        </style>
    </head>
    <body>
        <a href="http://java2s.com">Website</a>
        <p>I like <span>CSS</span> and HTML.</p>
        <a href="http://w3c.org">Visit the W3C website</a>
    </body>
</html>

Related Tutorials