Link Tag and its attributes:
<a> Defines a hyperlink. Supports global and event attributes.
Attributes:
- charset char_encoding Not supported in HTML5. It specifies the character-set of a linked document
- coords coordinates Not supported in HTML5. It specifies the coordinates of a link
- download filename It specifies that the target will be downloaded when a user clicks on the hyperlink
- href URL Specifies the URL of the page the link goes to
- hreflang language_code Specifies the language of the linked document
- media media_query It specifies what media/device the linked document is optimized for
- name section_name Not supported in HTML5. Use the global id attribute instead. Specifies the name of an anchor
- ping list_of_URLs It specifies a space-separated list of URLs to which, when the link is followed, post requests with the body ping will be sent by the browser (in the background). Typically used for tracking.
- rel alternate author bookmark external help license next nofollow noreferrer noopener prev search tag Specifies the relationship between the current document and the linked document
- rev text Not supported in HTML5. Specifies the relationship between the linked document and the current document
- shape default rect circle poly Not supported in HTML5.Specifies the shape of a link
- target _blank _parent _self _top framename Specifies where to open the linked document
- type media_type Specifies the media type of the linked document
<link> Defines the relationship between a document and an external resource(most used to link to style sheets)
Attributes:
- charset char_encoding Not supported in HTML5.Specifies the character encoding of the linked document
- crossorigin anonymous use-credentials It 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. It 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 It specifies the media type of the linked document.
<nav> Defines navigation links. Supports global and event attributes.
Image Tag and its attributes:
<img> Defines an image. Supports global and event attributes.
Attributes:
- align top bottom middle left right Not supported in HTML5. Specifies the alignment of an image according to surrounding elements
- alt text Specifies an alternate text for an image
- border pixels Not supported in HTML5. Specifies the width of the border around an image
- crossorigin anonymous use-credentials Allow images from third-party sites that allow cross-origin access to be used with canvas
- height pixels Specifies the height of an image
- hspace pixels Not supported in HTML5. Specifies the whitespace on left and right side of an image
- ismap ismap Specifies an image as a server-side image-map
- longdesc URL Specifies a URL to a detailed description of an image
- sizes Specifies image sizes for different page layouts
- src URL Specifies the URL of an image
- srcset URL Specifies the URL of the image to use in different situations
- usemap #mapname Specifies an image as a client-side image-map
- vspace pixels Not supported in HTML5. Specifies the whitespace on top and bottom of an image
- width pixels Specifies the width of an image
<map> Defines a client-side image-map. Supports global and event attributes.
Attributes:
- name mapname Required. Specifies the name of an image-map
<area> Defines an area inside an image-map. Supports global and event attributes.
Attributes:
- alt text Specifies an alternate text for the area. Required if the href attribute is present
- coords coordinates Specifies the coordinates of the area
- download filename Specifies that the target will be downloaded when a user clicks on the hyperlink
- href URL Specifies the hyperlink target for the area
- hreflang language_code Specifies the language of the target URL
- media media query Specifies what media/device the target URL is optimized for
- nohref value Not supported in HTML5.Specifies that an area has no associated link
- rel alternate author bookmark help license next nofollow noreferrer prefetch prev search tag Specifies the relationship between the current document and the target URL
- shape default rect circle poly Specifies the shape of the area
- target _blank _parent _self _top framename Specifies where to open the target URL
- type media_type Specifies the media type of the target URL
<canvas> Used to draw graphics, on the fly, via scripting (usually JavaScript).Supports global and event attributes.
Attributes:
- height pixels Specifies the height of the canvas
- width pixels Specifies the width of the canvas
<figcaption> Defines a caption for a <figure> element. Supports global and event attributes.
<figure> Specifies self-contained content. Supports global and event attributes.
<picture> Defines a container for multiple image resources. Supports global and event attributes.
<svg> Defines a container for SVG graphics
<!DOCTYPE html>
<html>
<head>
<p id="sample"></p>
<title> Image Tag and Link Tag </title>
</head>
<body bgcolor = "yellow">
<h1 align= "center">Image tag demo</h1>
<img src="logo.jpeg" alt="My logo" height="400px" width="600px"></img>
<h1 align= "center">Link tag demo</h1>
<a href="https://aryanschooltech.blogspot.com/" target="_blank">Visit to my website</a>
</body>
</html>
<!-- These are Basic HTML5 Link and Image Tag-->
<!DOCTYPE html>
<html>
<head>
<p id="sample"></p>
<title> Image Tag and Link Tag </title>
</head>
<body bgcolor = "yellow">
<h1 align= "center">Image tag demo</h1>
<img src="logo.jpeg" alt="My logo" height="400px" width="600px"></img>
<h1 align= "center">Link tag demo</h1>
<a href="https://aryanschooltech.blogspot.com/" target="_blank">Visit to my website</a>
</body>
</html>
<!-- These are Basic HTML5 Link and Image Tag-->
No comments:
Post a Comment