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.


"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>

    1 comment:

    Follow on Twitter

    Linkedin

    Categories

    Contact Form

    Name

    Email *

    Message *

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.