Home » Web Design » How to create own custom html tag in HTML

Here is one of the way to create own custom html tag in HTML

STEP 1

Normalize its attributes in your CSS Stylesheet (think css reset) – Example:

 stack{display:block;margin:0;padding:0;border:0; ... }

STEP 2

Make it work in old versions of Internet Explorer by appending this script to the head (Important!):

<!--[if lt IE 9]> 
 <script> document.createElement("stack"); </script>
 <![endif]-->

STEP 2

Then you can use your custom tag freely.

<stack> Overflow </stack>

Feel free to set attributes as well…

<stack id="st2" class="nice"> hello </stack>

Wordpress Freelancer, Joomla Freelancer Web designer Mumbai india, Wordpress web developer India, Joomla Web developer india, Outsourcing web project india mumbai

By Santosh Kori Published: October 10, 2012 Professional Freelance Website developer 5 stars based on 65 reviews Total time: 24 hour 00 min Wordpress Joomla XHTML CSS jQuery HTML5 eCommerce CSS3 ☞ Offers low cost freelance web designing, asp php asp.net web development services from Mumbai India. Freelance web designer & developer Mumbai India.

I AM NOT AVAILABLE FOR WEB DESIGN & DEVELOPMENT PROJECTS