HTML Attribute - 99codes

HTML Attribute :-

* HTML qualities are exceptional words which give extra data about the components or              
   characteristics are the modifier of the HTML component. 

* Every component or tag can have qualities, which characterizes the conduct of that
    component. 

* Qualities ought to dependably be connected with begin tag. 

* The Attribute ought to dependably be connected with its name and esteem match. 

* The Attributes name and qualities are case delicate, and it is suggested by W3C that it ought to
   be written in Lowercase as it were. 

* You can include different qualities in a single HTML component, yet need to give space
  between two traits.


Syntax :-

<element attribute_name="value">content</element>
Example :-
<html>
<head>
</head>
<body>
<h1> This is Style attribute</h1>
<p style="height: 50px; shading: blue">It will include style property in element</p>
<p style="color: red">It will change the shade of content</p>
</body>
</html>


The title attribute in HTML :-

Description: The title characteristic is utilized as content tooltip in the greater part of the
programs. It show its content when client move the cursor over a connection or any content.
You can utilize it with any content or connection to demonstrate the depiction about that
connection or content. In our precedent, we are taking this with section tag and heading tag.


Example :-

With <h1> tag:
<h1 title="This is heading tag">Example of title attribute</h1>
With <p> tag:
<p title="This is paragraph tag">Move the cursor over the heading and paragraph, and you will
see a description as a tooltip</p>


Code:-

<html> 
  <head> 
 </head> 
<body> 
     
  <h1 title="This is heading tag">Example of title attribute</h1> 

  <p title="This is paragraph tag">Move the cursor over the heading and paragraph, and you will 
     see a description as a tooltip</p> 
 
</body> 
</html>


The href attribute in HTML :-

Description: The href trait is the fundamental characteristic of <a> grapple tag. This trait gives the connection address which is indicated in that interface. The href characteristic gives the hyperlink, and in the event that it is clear, it will stay in same page.

Example :-

With link address:-

<a href="https://www.google.com">This is a link</a>

Without link address:-


<a href="">This is a link</a>


Code:-

<html> 
  <head> 
 </head> 
<body> 
 
  <h1>Display of href attribute</h1> 
  <p>Below is the link of anchor tag, click the link and see the next page</p> 
  <a href="https://www.google.com">This is a link</a> 
 
</body> 
</html> 

The src Attribute:-

The src characteristic is one of the vital and required quality of <img> component. It is hotspot for the picture which is required to show on program. This quality can contain picture in same catalog or another registry. The picture name or source ought to be right else program won't show the picture.


Example:-

<img src="picture.jpg" height="400" width="600">

Code:-

<html> 
  <head> 
 </head> 
<body> 
 
  <h1>Example of src attribute</h1> 
  <p>HTML images can be diplayed with the help of image tag and its attribute src gives the sourc for that image</p> 
  <img src="picture.jpg" height="400" width="700"> 
   
</body> 
</html>













HTML Attribute - 99codes HTML Attribute - 99codes Reviewed by Arup Roy on January 27, 2019 Rating: 5

No comments:

Powered by Blogger.