Web design: CSS properties vs html attributes

Tutoring, definitions are important. The tutor shares the difference between CSS properties and html attributes.

A CSS property is something you change to affect the appearance of an element. For instance, the color property can be set to the color you want the text to print in. The font-size property can be set to the size you want the text to appear.

An html attribute doesn’t change the appearance of the element, but describes it in some other way. As an example, a name can have the title=”descriptionattribute to describe more about it when the user mouses over. The alt=”text descriptionattribute renders descriptive text when the image won’t be rendered. lang (language) and href (destination of an anchor tag) are two more attributes.

I would say that, indeed, properties belong to CSS, while attributes belong to html.

Source:

w3schools.com

w3schools.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Tagged with:

Leave a Reply