HTML <body> text Attribute

Example Specify the color of text in an HTML document: <html> <body text=”green”> <h1>Hello world!</h1> <p><a href=”https://www.w3schools.com”>Visit W3Schools.com!</a></p> </body> </html> Try it Yourself » Definition and Usage The text attribute specifies the color of the text in a document. Browser Support Attribute text Yes Yes Yes Yes Yes Compatibility Notes The <body> text attribute is not supported […]

HTML <body> link Attribute

Example Set the default link color to “blue” in an HTML document: <html> <body link=”blue”> <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 link attribute specifies the default color of unvisited links in a document. Browser Support Attribute link Yes Yes Yes Yes Yes Compatibility Notes The <body> link attribute is […]

HTML <body> bgcolor Attribute

Example Specify a background color for an HTML document: <html> <body bgcolor=”#E6E6FA”> <h1>Hello world!</h1> <p><a href=”https://www.w3schools.com”>Visit W3Schools.com!</a></p> </body> </html> Try it Yourself » Definition and Usage The bgcolor attribute specifies the background color of a document. Browser Support Attribute bgcolor Yes Yes Yes Yes Yes Compatibility Notes The <body> bgcolor attribute is not supported in HTML5. Use […]

HTML <body> background Attribute

Example Specify a background image for an HTML document: <html> <body background=”bgimage.jpg”> <h1>Hello world!</h1> <p><a href=”https://www.w3schools.com”>Visit W3Schools.com!</a></p> </body> </html> Try it Yourself » Definition and Usage The background attribute specifies a background image for a document. Browser Support Attribute background Yes Yes Yes Yes Yes Compatibility Notes The <body> background attribute is not supported in HTML5. Use […]

HTML <basefont> size Attribute

Example Specify the default font-size for text on page: <head> <basefont size=”7″> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The size attribute specifies the default font-size for the text in a document. Browser Support Attribute size Not supported Not supported Not supported Not supported Not […]

HTML <basefont> face Attribute

Example Specify the default font for text on page: <head> <basefont face=”courier, serif”> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The face attribute specifies the default font for the text in a document. Browser Support Attribute face Not supported Not supported Not supported Not supported […]

HTML <base> target Attribute

Example Specify a default target for all hyperlinks and forms on a page: <head> <base target=”_blank”> </head> Try it Yourself » Definition and Usage The target attribute specifies the default target for all hyperlinks and forms in the page. This attribute can be overridden by using the target attribute for each hyperlink/form. Browser Support Attribute target […]

HTML <base> href Attribute

Example Specify a base URL for all relative URLs on a page: <head> <base href=”https://www.schools.com/images/”> </head> Try it Yourself » Definition and Usage The href attribute specifies the base URL for all relative URLs on a page. Browser Support Attribute href Yes Yes Yes Yes Yes Syntax <base href=”URL“> Attribute Values Value Description URL An absolute […]

HTML <area> type Attribute

Example The type attribute specifies the media type of the target URL: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”/images/sun.gif” type=”image/gif”> </map> Try it Yourself » Definition and Usage The type attribute specifies the Internet media type (formerly known as MIME type) of the target URL. This attribute is only used if the href attribute is set. Note: This attribute is […]

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> rel Attribute

Example An image-map, with a clickable area: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”sun.htm” rel=”alternate”> </map> Try it Yourself » Definition and Usage The rel attribute specifies the relationship between the current document and the linked document. Only used if the href attribute is present. Browser Support Attribute rel Yes Yes Yes Yes Yes Differences Between HTML 4.01 and […]

HTML <area> media Attribute

Example An image-map, with a clickable area: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”sun.htm” media=”screen and (min-color-index:256)”> </map> Try it Yourself » Definition and Usage The media attribute specifies what media/device the target URL is optimized for. This attribute is used to specify that the URL is designed for special devices (like iPhone) , speech or print media. This […]

HTML <area> hreflang Attribute

In this article we will learn <area> hreflang 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″ alt=”Sun” href=”sun.htm” hreflang=”en”> </map> Try it Yourself » Definition and Usage This <area> attribute specifies the language of the target URL in the area. This attribute is only used if the href attribute is set. Note: This attribute is purely advisory. […]

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 <a> name Attribute

Example The name attribute specifies the name of an anchor: <a name=”C4″>Chapter 4</a> Try it Yourself » Definition and Usage The <a> name attribute is not supported in HTML5. Use the id attribute instead. The name attribute specifies the name of an anchor. The name attribute is used to create a bookmark inside a document. Syntax <a name=”value”> […]

HTML <a> ping Attribute

Example When the user clicks on the w3schools.com/html link, notify w3schools.com/trackpings: <a href=”https://dwfaisalabad.com/” ping=”https://dwfaisalabad.com/trackpings”> Definition and Usage The ping attribute specifies a list of URLs to be notified if the user follows the hyperlink. When the user clicks on the hyperlink, the ping attribute will send a short HTTP POST request to the specified URL. This attribute […]

HTML <a> rel Attribute

Example A link with a rel attribute: <a rel=”nofollow” href=”https://dwfaisalabad.com/”>DW Fsd</a> Try it Yourself » Definition and Usage The rel attribute specifies the relationship between the current document and the linked document. Only used if the href attribute is present. Differences Between HTML 4.01 and HTML5 Some values are removed, and some new values are added. Syntax […]

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 […]

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> type Attribute

Example The type attribute specifies the media type of the linked document: <a href=”https://dwfaisalabad.com” type=”text/html”>dwfaisalabad</a> Try it Yourself » Definition and Usage The type attribute specifies the Internet media type (formerly known as MIME type) of the linked document. This attribute is only used if the href attribute is set. Note: This attribute is purely advisory. Differences Between […]