6/18/20

HTML ATTRIBUTES :- Explanation with Example


Hey Guys, we are back again with a new article. I hope you like the series of HTML, in the previous article we learned about HTML Editors and Visual Studio Code hope you like the article, and you haven’t any queries about the article. And if you have any queries, DM me on my social media or Comment below the article. Let’s go with our new article in this article we are going to cover HTML attributes. But before that, you should clear about what HTML elements are. If you do not know about HTML element then you may get some trouble in understanding HTML attributes. So first read about Html Element then read HTML attributes.



HTML ATTRIBUTES

Html attributes are used to add information about the Html element. It provides additional information about the elements.
  • The attribute is always specified (placed) on the “starting tag”.
  •  It never is on “Ending tags”.
  • All Html elements can have attributes.
  • Html elements can have multiple attributes.
  • Html Attribute is composed of name/value pairs.
  • Example:- name = “value ”
  • A value can be surrounded by quotation marks (“ ”)
       as well as Single Quote (‘ ’).  

An HTML Attribute is composed of
  • An Attribute name (Name)
  • An Equal Sign (=)
  • A value surrounded by quote either single or double (“Value”)





Let us see with another example:-

The (src) Attribute

The <img> tag is used to embed (insert) an Image in a Html page. The src attribute describes the path where the image is at.

Ex:-

<html>
<head>
<title> Example of Attributes in HTML </title
</head>
<body>
<img src = "C:\Users\Mad About Computer\Desktop\ronaldo.jpg”>
</body>
</html>


OUTPUT:-



I hope you have understood, what I want to explain to you. If you have any quarries related to this tutorial then let me know through your comment. And if you like this tutorial then don’t forget to share with other computer lovers or Friend Circle those who interested to learn HTML.


0 comments:

Post a Comment

Like us on facebook

blogger templatesblogger widgets

Follow on Twitter

Linkedin

Categories

Contact Form

Name

Email *

Message *

Mad About Computer. Powered by Blogger.