Introduction
In this quick tip, we will learn how to create an icon in the title bar using the link tag.
What is <Link> tag?
The <link> tag is used to define a relationship between an HTML document and an external resource.
And the link element relationship between the one or more external CSS stylesheet is most common.
All of the <link> elements must be placed in the <head> section of the HML document.
And, the link tag does not need to have the closing tag.
Example
- <link rel=”stylesheet” type=”text/css” href=”layout.css”>
Let's start! Open your Notepad and type the following HTML code. Then, save the HTML file with .html extension.
HTMLcode
Page Title – Facebook
- rel-specifies the relationship between the Element and icon
- Href- Icon or image name and its type.
Now, run it in the browser.
The output looks like this.
I hope you liked this small tip.
OTHER EXAMPLES
Example 1: HTML5 icon
Example 2: India Flag icon
Example 6: WhatsApp icon