Table of Contents

W3.CSS Text colors

  • The W3-text-color classes set the background color for any HTML element.
Example
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<link rel="stylesheet" href="w3.css">
<body>
<div class="w3-container">
<h1>Text Colors</h1>
<p>The w3-text-color classes defines text colors for HTML elements:</p>
<div class="w3-text-green">
<h2>Color Green</h2>
<p>This Paragraph is green text.</p>
</div>
<div class="w3-text-yellow">
<h2>Color Yellow</h2>
<p>This Paragraph is Green text.</p>
</div>
</div>
</body>
</html>