HTML Attributes
In HTML5 every element contains different attributes. The attributes are used to define additional information of an HTML tag. For example you can change the length and the weight of an image using length and with attribution in the HTML tag. All the HTML attributes are defined in the first tag or you can say the starting tag. Attributes are usually defined as attribute="value".
There are many types of attributes:
- The language attribute
- the title attribute
- The Href attribute
- The size attribute
- The alt attribute etc...
The language attribute/ lang
The language or lang attribute is used to define the language of an web page. Which tag is usually used in the <html> tag of the webpage. Declaring a language is very important nowadays because it helps the search engine to find out the main language of the website it also helps you in Search Engine Optimization. This is also beneficial if if you are using a translator in your website.
<!DOCTYPE html>
<html lang="en-US">
<!--web code-->
</html>
The Title Attribution
The title attribution is used to define the title of a paragraph. It activates when when your mouse is over the paragraph so it will show you a bubble containing the title of the paragraph you have defined in the title attribution within the paragraph tag.
<!DOCTYPE html>
<html>
<body>
<h1>Title Attribute Example</h1>
<p title="Guidater blog">
Mouse over this line, you will see the title attribute as Guidater blog.
</p>
</body>
</html>
Output
Title Attribute Example
Mouse over this line, you will see the title attribute as Guidater blog.
The Href Attribute
The href is used to define the URL address of link tag.<!DOCTYPE html>
<html>
<body>
<a href="https://guidater.blogspot.com">Guidater</a>
</body>
</html>
Output
The Alt Attribute
The ALT is the abbreviation of alternative which is used to define the alternative text offer image of video. This is very helpful for search Indian to understand what all about is your video on image and also helpful for the people with the disabilities. When you put your mouse over the image of the video the alternative text will be shown in a small bubble on the screen.Another feature of alternative text is if you video or image is not supported by the device of the uses the alternative text will be shown and the place of that image or video. This technique could be very helpful to reach out to the people with the old internet Browsers and devices.
<!DOCTYPE html>
<html>
<body>
<img src="blogger.jpg" alt="This image is not working" width="104" height="142">
</body>
</html>

The Size Attributes
Decide attributes are used to define the size of a image of a video in HTML web page. With the help of lens attribution you can define the length of the image and with the attribution of which you can define the weight of an image or a video. The src attribution define the source of an media file like image and video in a HTML webpage.<!DOCTYPE html>
<html>
<body>
<img src="image.jpg" width="104" height="142">
</body>
</html>
No comments:
Post a Comment