CSS Color, Margin, and Padding properties Example
318
24-Mar-2025
Updated on 24-Oct-2025
Ashutosh Kumar Verma
24-Mar-2025Here is a simple example that demonstrates the use of CSS properties:
color,padding, andmarginin an HTML page.Explanation
color: this CSS property change the text color.background-color: this CSS property change the background color of HTML elementsmargin: This CSS property is used to add the space from outside of the contents in a specific or all directionpadding: This CSS property is used to add space inside of the HTML elements in a specific or all directionsOutput
Also, Read: Explain the CSS Custom Properties