HTML src Attribute
The src attribute in HTML specifies the URL of a resource (such as an image, audio, or video) to be embedded or included in the webpage.
Example: This example explains the HTML src Attributes to specify the source address of the file.
<html>
<head>
<title>src Attribute</title>
</head>
<body>
<img src=
"https://media.w3wiki.org/wp-content/cdn-uploads/Geek_logi_-low_res.png">
</body>
</html>
Output:
HTML Attributes
HTML attributes provide additional information about elements within an HTML document. Every HTML element can have attributes. Attributes are always defined in the start tag. They are specified using a name/value pair format, where the attribute name defines the property, and its value provides specific details, like name=”value”. These attributes impact content display and interaction on web pages.
Let’s explore the key aspects of HTML attributes:
Table of Content
- HTML Global Attributes
- HTML src Attribute
- HTML alt Attribute
- HTML width and height Attribute
- HTML id Attribute
- HTML title Attribute
- HTML href Attribute
- HTML style Attribute
- HTML lang attribute
Contact Us