How to make custom attribute in Html5 ?

Hi all,

You can make your own custom attribute using data-. It allows possessive exchanged information between HTML and its DOM representation. It can work with javascript also, every browser will let you fetch and modify data attributes using the getAttribute and setAttribute methods,

Example with css –

css :-

section [data-index='123'] {
color:red;
width:200px;
}

How to make custom attribute in Html5 ?

-For full set of codes /steps, visit the complete Blog: How to make custom attribute in Html5 ?

FindNerd is the right place to resolve HTML problems. Here you can post Html Help Forum.

Apart from this,  If you have any PHP language query, you can post at PHP questions and answers and get instantly resolved it from highly experienced FindNerd community members.

Advertisements
How to make custom attribute in Html5 ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s