How to make HTML link Tag - Techzoonbd

Post Top Ad

Responsive Ads Here

How to make HTML link Tag

Share This

Example

Link to an external style sheet:

<head>
  <link rel="stylesheet" type="text/css" href="theme.css">
</head>

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.
Differences Between HTML 4.01 and HTML5
Some HTML 4.01 attributes are not supported in HTML5.
The "sizes" attribute is new in HTML5.

Differences Between HTML and XHTML
In HTML the <link> tag has no end tag.
In XHTML the <link> tag must be properly closed.

Attributes

 New in HTML5.

Attribute
Value
Description
charset
char_encoding
Not supported in HTML5.
Specifies the character encoding of the linked document
crossorigin
anonymous
use-credentials
Specifies how the element handles cross-origin requests
href
URL
Specifies the location of the linked document
hreflang
language_code
Specifies the language of the text in the linked document
media
media_query
Specifies on what device the linked document will be displayed
rel
alternate
author
dns-prefetch
help
icon
license
next
pingback
preconnect
prefetch
preload
prerender
prev
search
stylesheet
Required. Specifies the relationship between the current document and the linked document
rev
reversed relationship
Not supported in HTML5.
Specifies the relationship between the linked document and the current document
sizes
HeightxWidth
any
Specifies the size of the linked resource. Only for rel="icon"
target
_blank
_self
_top
_parent
frame_name
Not supported in HTML5.
Specifies where the linked document is to be loaded
type
media_type
Specifies the media type of the linked document



No comments:

Post a Comment

Post Bottom Ad

Responsive Ads Here

Pages