HTML <link> Attribute

HTML <link> charset Attribute Example The charset attribute indicates that the linked document is written in Japanese: <link href=”domoarigato.htm” rel=”parent” charset=”ISO-2022-JP”> Definition and Usage The <link> charset attribute is not supported in HTML5. The charset attribute specifies the character encoding of the linked document. The default character-set for modern browsers is ISO-8859-1. Syntax <link charset=”character_set”> Attribute Values Value Description character_set […]

HTML DOM Head Object

Head Object The Head object represents an HTML <head> element. Access a Head Object You can access a <head> element by using getElementsByTagName(): var x = document.getElementsByTagName(“HEAD”)[0]; Create a Head Object You can create a <head> element by using the document.createElement() method: var x = document.createElement(“HEAD”); Standard Properties and Events The Anchor object also supports the standard properties and events.

HTML <link> Tag

Example Link to an external style sheet: <head> <link rel=”stylesheet” type=”text/css” href=”theme.css”> </head> Try it Yourself » Definition and Usage The <link> tag defines a link between a document and an external resource. The <link> tag is used to link to external style sheets. Browser Support When used for style sheets, the <link> tag is supported in all […]

HTML <b> Tag

Example <p>This is normal text – <b>and this is bold text</b>.</p> Try it Yourself » Definition and Usage The <b> tag specifies bold text. Browser Support Element <b> Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 NONE. Tips and Notes Note: According to the HTML 5 specification, the <b> tag should be used as […]

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

Example Use of the charset attribute in a link: <a charset=”UTF-8″ href=”https://dwfaisalabad.com”>www.dwfaisalabad.com</a> Try it Yourself » Definition and Usage The <a> charset attribute is not supported in HTML5. The charset attribute specifies the character-set of the linked document (the document referenced in the href attribute). Syntax <a charset=”value”> Attribute Values Value Description character_set The character-set of the […]

HTML <a> Tag

Example A link to W3Schools.com: <a href=”https://dwfaisalabad.com”>Visit DW Fsd</a> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link’s destination. […]