Home > other >  Create custom tags html
Create custom tags html

Time:10-15

I want to create custom tags in html to do some sort of thing like is there any way to turn html and css divs into tags?

.me {
  width: 100px;
  height: 100px;
  background-color: red;
}
<div class="me"></div><br>
<p>Make the above div a "redbox" tag or something</p>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

CodePudding user response:

You can so something like this:

redbox {
  display: block;
  width: 100px;
  height: 100px;
  background-color: red;
}
<redbox></redbox>
<iframe name="sif2" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

or

redbox {
  display: block;
  width: 100px;
  height: 100px;
  background-color: red;
}
<redbox />
<iframe name="sif3" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

  • Related