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=”description” attribute to describe more about it when the user mouses over. The alt=”text description” attribute 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:
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.