HTML <tr> align Attribute

Example Right-align the content of all the cells in the second table row: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr align=”right”> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » Definition and Usage The align attribute specifies the horizontal alignment of the content in a table row. Browser Support Attribute align Yes Yes Yes Yes Yes Note: None of […]

HTML <colgroup> valign Attribute

Example An HTML table with different vertical-aligned columns: <table style=”height:200px”> <colgroup valign=”top”> <colgroup valign=”bottom”> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> Try it Yourself » Definition and Usage The valign attribute specifies the vertical alignment of the content in a column group. Browser Support Attribute valign Not supported Yes Not supported Not supported Not supported The […]

HTML <colgroup> align Attribute

Example Two <colgroup> elements that specify different alignment for the three columns in the table (notice that the first <colgroup> element spans two columns): <table style=”width:100%”> <colgroup span=”2″ align=”left”></colgroup> <colgroup align=”right”></colgroup> <tr> <th>ISBN</th> <th>Title</th> <th>Price</th> </tr> <tr> <td>3476896</td> <td>My first HTML</td> <td>$53</td> </tr> </table> Try it Yourself » Definition and Usage The align attribute specifies the horizontal alignment of […]

HTML <col> align Attribute

Example Specify the alignment for the three columns in the table: <table style=”width:100%”> <col align=”left”> <col align=”left”> <col align=”right”> <tr> <th>ISBN</th> <th>Title</th> <th>Price</th> </tr> <tr> <td>3476896</td> <td>My first HTML</td> <td>$53</td> </tr> </table> Try it Yourself » Definition and Usage The align attribute specifies the horizontal alignment of the content related to a <col> element. Browser Support Attribute align Not […]

HTML <body> vlink Attribute

Example Set the visited link color to “red” in an HTML document: <html> <body vlink=”red”> <p><a href=”https://www.w3schools.com”>W3Schools.com</a></p> <p><a href=”https://www.w3schools.com/html/”>HTML Tutorial</a></p> </body> </html> Try it Yourself » Definition and Usage The vlink attribute specifies the color of visited links in a document. Browser Support Attribute vlink Yes Yes Yes Yes Yes Compatibility Notes The <body> vlink attribute is not […]

HTML <area> target Attribute

Example An image-map, with clickable areas, and a target attribute: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun” target=”_blank”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The target attribute specifies where to open the linked document. Only used if the href attribute is present. Browser Support Attribute target Yes Yes Yes Yes Yes Differences Between HTML […]

HTML <area> shape Attribute

Example An image-map, with clickable areas: <img src =”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The shape attribute specifies the shape of an area. The shape attribute is used together with the coords attribute to specify the size, shape, and placement of an area. Browser Support Attribute shape Yes Yes Yes Yes […]

HTML <applet> Tag

Not Supported in HTML5 Example An embedded Java applet: <applet code=”Bubbles.class” width=”350″ height=”350″> Java applet that draws animated bubbles. </applet> Definition and Usage The <applet> tag is not supported in HTML5. Use <embed> or <object> instead. The <applet> tag defines an embedded applet. Differences Between HTML 4.01 and HTML5 The <applet> tag is not supported in HTML5. Required Attributes Attribute Value Description […]

HTML <a> rev Attribute

Example A link with a rev attribute: <a rev=”nofollow” href=”https://dwfaisalabad.com/”>Cheap Flights</a> Try it Yourself » Definition and Usage The <a> rev attribute is not supported in HTML5. The rev attribute specifies the relationship between the linked document and the current document. The rev attribute is the reverse of the rel attribute. Syntax <a rev=”value“> Attribute Values Value Description alternate […]

HTML <a> target Attribute

Example The target attribute specifies where to open the linked document: <a href=”https://dwfaisalabad.com” target=”_blank”>Visit DW Fsd</a> Try it Yourself » Definition and Usage The target attribute specifies where to open the linked document. Syntax <a target=”_blank|_self|_parent|_top|framename“> Attribute Values Value Description _blank Opens the linked document in a new window or tab _self Opens the linked […]

HTML <a> coords 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> coords attribute is not supported in HTML5. The coords attribute is used together with the shape attribute to specify the size, shape, and placement […]

HTML Attributes

Attributes provide additional information about HTML elements. HTML Attributes All HTML elements can have attributes Attributes provide additional information about an element Attributes are always specified in the start tag Attributes usually come in name/value pairs like: name=”value” The href Attribute HTML links are defined with the <a> tag. The link address is specified in the href attribute: Example <a href=”https://www.google.com”>This is a link</a> Try […]