3 HTML Tag Misdeeds That You Shouldn’t Commit
Below are three of the most common coding mistakes and also there is a remedy to avoid these mistakes.
1) Placing block elements inside inline elements:
<a href="url"><h3>Wrong way</h3></a>, Here <H3> is used in the inline element <a> and that is one kind of code mistake. Correct this code as per below mentioned;
<h3><a href=" url ">Right way</a></h3>
2) Not including an alt attribute on images:
<img src=” image-url”/> there is no Alt Attribute and that is bad practice so use alt Attribute with image
<img src=” image-url” alt="text about image"/>
3) Using inline styling:
<h3 style=""Color: Green">text</h3>
We have heard it a thousand times that inline styling is bad. So it is advisable to keep styles in stylesheets where they feel right.
|