Show List

Sample CSS

Here is a sample HTML page code with inline and internal CSS. Save this code in file with .html extension and open with a browser program such as Chrome.

<!DOCTYPE html>
<html>

<head>
    <style>
        .cityDiv{
            box-shadow: 1px 1px 3px #222222;
            padding: 10px;
            margin: 10px;
        }
    </style>
</head>

<body>
    <div id="london" class="cityDiv" title="London Title" >London</div>
    <div id="paris" class="cityDiv" title="Paris Title" >Paris</div>
    <div id="washington" class="cityDiv" title="Washington Title" style="background-color: orange" >Washington</div>
    <div id="montreal" class="cityDiv" title="Montreal Title" style="background-color: skyblue" >Montreal</div>
</body>

</html>
Output
London
Paris
Washington
Montreal

    Leave a Comment


  • captcha text