Tuesday, September 19, 2023

HTML Styles

                                       HTML Styles

The HTML style attribute is used to add styles to an element, such as color, font, size, and more.

Example

A new webpage opens as shown below:

Background Color

The CSS background-color property defines the background color for an HTML element.

Example

Set the background color for a page to yellow:

Example

Setting background color for two different elements:

A new webpage opens as shown below:

Text Color

The CSS color property defines the text color for an HTML element:

Example

The text color is set according to the colors that have been chosen.

No comments:

Post a Comment

Building Static Website(part6) HTML Lists

  Building Static Website (part6) HTML Lists Today, let us add some lists to our detailed view section by using html lists. Lists: List is a...