HTML Tag | 您所在的位置:网站首页 › 民国著名的军阀有哪些名字 › HTML Tag |
HTML Syntax: Attributes: The src: It is used to specify the path to the image.alt: It is used to specify an alternate text for the image. It is useful as it informs the user about what the image means and also due to any network issue if the image cannot be displayed then this alternate text will be displayed.crossorigin: It is used to import images from third-party sites that allow cross-origin access to be used with canvas.height: It is used to specify the height of the image.width: It is used to specify the width of the image.ismap: It is used to specify an image as a server-side image map.loading: It is used to specify whether a browser should defer loading of images until some conditions are met or load an image immediately.longdesc: It is used to specify a URL to a detailed description of an image.referrerpolicy: It is used to specify which referrer information to use when fetching an image i.e. no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, unsafe-url.sizes: It is used to specify image sizes for different page layouts.srcset: It is used to specify a list of image files to use in different situations.usemap: It is used to specify an image as a client-side image map.
Example 1: In this example we are using the HTML GeeksforGeeks logo Output: ![]() img src with width and height Example 2: In this example, we are adding the style attribute to add a border to the image. HTML GeeksforGeeks logoOutput: ![]() image source with border Supported Browsers: Google ChromeEdge 12 and aboveInternet ExplorerSafariOperafirefox |
CopyRight 2018-2019 实验室设备网 版权所有 |