HTML Attribute in HTML5.0 Series with Video Lectures

HTML Attribute

As in the previous tutorials, we have been discussed about HTML Elements. Now we are going to discuss HTML Attribute.

Definition

All the HTML Elements have some attribute. The attribute of any element can be specified with the name and their value as shown in the below example. The attribute may have also globally scope that can be used in any place in the supported Elements.

Following is the example is shown <P> Elements have a title attribute in which the named of the attribute is Title and their value is About us.

[mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#c3f977″ txt_color=”#2d2d2d”]Example:  <p title=”About us”> My name is Abdul Jabbar. I am SEO Experts </p>[/mks_pullquote]

The attribute can be specified in the start tag and cannot be used in end tag.

An attribute of image Elements is used to the specified directory of an image where the image exists. And Alt attribute of an image is used to display the name of the image when an image does not exist.

[mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#c3f977″ txt_color=”#2d2d2d”]Example:  <img src = ”c:window/name.jpg” alt = “ stack of tuts LOGO ”>[/mks_pullquote]

Custom Attribute

Custom Attribute named to start with Data and Then next named of Attribute is according to your requirements. The syntax of the Custom Attribute shown in the following example.

[mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#c3f977″ txt_color=”#2d2d2d”] Example:  <div  class = ”data-example” data-subject = “Physics” Data-level = “Complex”> ………  </div>[/mks_pullquote]

Example Program of Video

<!DOCTYPE html>
<html>

<head>
<title> Attribute</title>
</head>

<body bgcolor="pink">

<p title="About us" align="center" style="color:green;">MY name is Abdul jabbar.
I am a web developer and SEO Experts.
</p>

</body>
</html>

Detailed of Program

  1. The following program, in the < body > Element bgcolor attribute is used to specified what color of the page in the background place. You can also change the body’s color according to your interest.
  2. Align = “center” this attribute is used to specify the position of the paragraph where we want to display.
  3. Style = “color:green” This attribute is used for inline CSS ( Cascading Style Sheet ). With inline CSS you can also change everything that is related to specified HTML Elements.

Video lecture of HTML5 Attribute in Urdu and Hindi

[mks_pullquote align=”left” width=”848″ size=”15″ bg_color=”#f3f977″ txt_color=”#191919″]I hopeful this article is very helpful to understand the HTML Attribute. This is a complete series of HTML 5 with Videos Tutorials in the Urdu Language. You can also learn about CSS 3.0 , PHP 7.0 and Python 3.0. Please also give your feedback. Thank You very Much…[/mks_pullquote]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top