Example

Link Tag in HTML

HTML

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>Link Tag in HTML</title>

		<!-- link Tag used to add a favicon to the website -->
		<link rel="shortcut icon" name="favicon" type="image/x-icon" href="https://skillzam.com/uploads/system/e353194f3b7cd1b75d69c3ab88041985.png"/>
		
		<!-- link Tag used to link current html file to external style sheet -->
		<link rel="stylesheet" href="/notes/examples/assets/style/custom.css"/>
	</head>
	<body>
	<!-- 
		<link> : Defines relationship between the current document & external resource.
		This is an empty element, it contains attributes only
		Used to link to external style sheets 
		To add a favicon to your website

		Attributes of link :
		rel (Required) : relationship between current & linked document
		href (URL) : location of the linked document 
		title : Defines a preferred or an alternate stylesheet
		type (media_type) : media type of the linked document
		hreflang : language of the text in the linked document
	-->

	<h1>Demo: Link Tag in HTML</h1>

	<p>The above heading Tag has been styled by external css file ( custom.css ) using the link Tag. </p>
	
	</body>
</html>                    
                    

Output

View original