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 <main> Tag

Example <main> <h1>Web Browsers</h1> <p>Google Chrome, Firefox, and Internet Explorer are the most used browsers today.</p><article> <h1>Google Chrome</h1> <p>Google Chrome is a free, open-source web browser developed by Google, released in 2008.</p> </article><article> <h1>Internet Explorer</h1> <p>Internet Explorer is a free web browser from Microsoft, released in 1995.</p> </article> <article> <h1>Mozilla Firefox</h1> <p>Firefox is a free, […]

HTML <th> abbr Attribute

Example Use of the abbr attribute in an HTML table: <table> <tr> <th abbr=”Make”>Toy manufacturer</th> <th abbr=”Model”>Vehicle model</th> </tr> <tr> <td>Bruder Toys</td> <td>Cross Country Vehicle</td> </tr> <tr> <td>Bruder Toys</td> <td>DHL Lorry</td> </tr> </table> Try it Yourself » Definition and Usage The abbr attribute specifies a shorter version of the content in a header cell. Browser Support Attribute […]

HTML <th> Tag

Example A simple HTML table with two header cells and two data cells: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <th> tag defines a header cell in an HTML table. An HTML table has two kinds of cells: […]

HTML Images

Images can improve the design and the appearance of a web page. HTML Images Syntax In HTML, images are defined with the <img> tag. The <img> tag is empty, it contains attributes only, and does not have a closing tag. The src attribute specifies the URL (web address) of the image: <img src=”url“> The alt Attribute The alt attribute provides an alternate text for an […]