Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div id="wrapMe">링크로 감싸 주세요~</div>
<br />
<span class="interword">전 li로 ^^</span>
<br />
<br />
<input type="button" value="Div를 링크로 감싸기" onclick="wrapLink()">
<br />
<br />
<input type="button" value="span을 li로 감싸기" onclick="wrapLi()">




                function wrapLink() {
  //태그를 추가할 태그를 찾고
  var div = document.getElementById('wrapMe');
  //태그를 생성하고(여기선 'a')
  var link = document.createElement('a');
  //기존 태그 내용을 추가해주고
  link.innerHTML = div.outerHTML;
  //감쌀 태그의 속성을 지정한다.(필요한 경우만)
  link.setAttribute('href', '#');
  //만든 태그를 부모노드에 추가하고
  div.parentNode.insertBefore(link, div);
  //기존 검색한 태그를 지워서 완성한다.

function wrapLi() {