CSS Practice

How to change text color in CSS:

For CSS class use . (dot) and for CSS ID use # (hash)



=============================
HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>This is a page with CSS</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div id="red">This is a red text</div>
    <div class="green">This is a green text</div>
</body>
</html>

----------------------------------
CSS:

#red{
   color: red;
}
.green{
   color: green;
}

===================================

Comments

Popular posts from this blog

How to set a minimum products number for an order in OpenCart v. 1.5.6.4

How to set a minimum price for an order in OpenCart v. 1.5.6.4

Reverse a number