Hi If you want to change the tags of HTML with another tags then you can perform this action using JS in realitme.
Let's consider and example to change the <h2> tag with <i> using JS.
<h2 class="xyzxterms" style="cursor: default; ">Converting Text to Italic</h2>
And write the JS code :-
var attrs = { };
$.each($("h2")[0].attributes, function(idx, attr) {
attrs[attr.nodeName] = attr.nodeValue;
});
$("h2").replaceWith(function () {
attrs.text = $(this).text();
return $("<i />", attrs);
});
Output:-
Converting Text to Italic
0 Comment(s)