HTML <picture> Tag

Example How to use the <picture> tag: <picture> <source media=”(min-width: 650px)” srcset=”img_pink_flowers.jpg”> <source media=”(min-width: 465px)” srcset=”img_white_flower.jpg”> <img src=”img_orange_flowers.jpg” alt=”Flowers” style=”width:auto;”> </picture> Try it Yourself » Definition and Usage The <picture> tag gives web developers more flexibility in specifying image resources. The most common use of the <picture> element will be for art direction in responsive designs. Instead of having one image that […]

HTML <th> bgcolor Attribute

Example Add a background color to header cells: <table> <tr> <th bgcolor=”#FF0000″>Month</th> <th bgcolor=”#00FF00″>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » Definition and Usage The bgcolor attribute specifies the background color of a header cell. Browser Support Attribute bgcolor Yes Yes Yes Yes Yes Compatibility Notes The bgcolor attribute of <th> is not supported […]

HTML <a> shape Attribute

Example Use of the shape and coords attribute in an <a> element, to create an image-map: <object data=”planets.gif” alt=”Planets” type=”image/gif” usemap=”#Map1″> <map name=”Map1″> <a href=”sun.htm” shape=”rect” coords=”0,0,82,126″>The Sun</a> <a href=”mercur.htm”shape=”circle” coords=”90,58,3″>Mercury</a> <a href=”venus.htm” shape=”circle” coords=”124,58,8″>Venus</a> </map> </object> Try it Yourself » Definition and Usage The <a> shape attribute is not supported in HTML5. The shape attribute is used together with the coords attribute to specify the size, shape, and placement […]