wrap() Method

Syntax

.wrap()

Description

wrap() method is used to cover or wrap a specified HTML structure around each of the selected element. The below example shows you how to wrap a HTML element to the matched elements.

Example Code

Result:

Text1

Text2




Ask Questions

Ask Question