Presentational Attributes vs Inline Styles

Presentational Attributes

Presentational Attributes works almost like inline styles but there is striking difference between them. It is advisable to use them specifically on SVGs and IMG tags. Presentational attributes are very easy to override and inline styles can only be override with !important keyword in CSS. Presentational Attributes <img src="path/to/image.jpg" width="450" height="350" /> OR <table width="100%"> <tr> <td>Some text</td> </tr> </table> The presentational attributes on the <img /> can be override easily with CSS like below: /* The style below will override the Presentational Attributes

Continue Reading