John
John

Reputation: 539

CSS add new Tag to html dynamically

Is there anyway to add new tag in Html through CSS?

like for Jquery but translated in css:

$('div.ms-inputuserfield').wrap('<a href="#"/>');

Upvotes: 1

Views: 403

Answers (1)

tenbits
tenbits

Reputation: 8018

No, with CSS there is only one possibility - pseudo selectors :after/:before with 'content' property. But it wont add the element to the DOM, so it wont be possible to reference it from the javascript.

Upvotes: 1

Related Questions