Attributes in HTML

Attributes in HTML5 are explained bellow as   Let’s go back to adding an image with the empty img element. Obviously, as we Know that an <img> tag is not very useful by itself—there’s no way to know which image to use.Therefore we use attributes in the tags for our understanding and browsers understanding. All the Attributes are instructions which are used to clarify or modify an element. For the img element, the src (short for “source”) attribute is required, and also used to specifies the location (URL) of the image file.

Syntax of Attribute

The syntax for an attribute is as follows:
First of All
attributename="value"
All the Attributes ususally go after the element name, separated by a space. In non-empty elements, attributes go in the opening tag only:
<element attributename="value">
<element attributename="value">Content</element>
<element attribute1="value" attribute2="value">

Demo

elements demo






The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.