🇯🇵 日本語 | 🇺🇸 English | 🇪🇸 Español | 🇵🇹 Português | 🇹🇭 ไทย | 🇨🇳 中文

CSS Selector Tutorial: How to Change the Color of p Tags to Orange

📝 Usage

This template is used to show how to change the text color of the **p-tag** using CSS. The text color will be changed to **orange**.

📘 Explanation

Below is how you can change the color of all **p-tags** to **orange** using CSS. We will explain how to apply the style to the p-tag.

🔹 Partial Code (Change color of p-tag)

/* Change the color of p-tag to orange */
p {
  color: orange; /* Orange color */
}
  

💻 Complete Working Code (Change color of p-tag)

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Change color of p-tag</title>
  <style>
    p {
      color: orange; /* Orange color */
    }
  </style>
</head>
<body>
  <p>This paragraph will be orange.</p>
  <p>Another paragraph will also be orange.</p>
</body>
</html>
  
Copied!