Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 23, 2016 04:13 pm GMT

Presentation Attributes vs Inline Styles

This is a distinction worth knowing about. They look pretty similar. They can do some of the same things. But, one is very easy to override and the other is not.

Inline styles are likely a bit more familiar:

<div style="width: 300px; height: 300px;">
Inline styles on an HTML element.
</div>

SVG can do that too:

<svg style="width: 300px;">
Inline styles on an SVG element.
</svg>

But SVG has this concept of presentational attributes as well, meaning we could do …


Presentation Attributes vs Inline Styles is a post from CSS-Tricks


Original Link: https://css-tricks.com/presentation-attributes-vs-inline-styles/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks