i have read about this theme but not solved. Something similar to header and footer html tag with content. Ok it not standard html custom tag, but i want something like:
<html>
<body>
<content>
This is a text
</content>
</body>
</html>
So, I have defined CSS as:
content {
backuground-color: red;
display: block;
padding: 1em;
}
And Javascript as:
var customTag = document.createElement('content');
var customTag = new customTag();
document.body.appendChild(customTag);
But something not work. How i can fix problem? What i forget to do more? Thanks very much.
<content> used to be an HTML tag (I think)...
Here's a way with <customcontent>, instead:
var cc=document.createElement("customcontent");
cc.innerText="Hello! I'm a custom content tag!";
document.body.append(cc);
customcontent {
background-color: red;
display: block;
padding: 1em;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With