Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div class="wrapper">
  <h1>Todo List</h1>
  <div class="todo-wrapper">
    <ul>
    </ul>
  </div>
</div>
              
            
!

CSS

              
                body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid black;
  width: 30vw;
  height: 80vh;
}

.todo-wrapper {
  border: 3px solid pink;
  width: 20vw;
  height: 50vh;
}
              
            
!

JS

              
                /*

  < Making todo list >

  할일 목록을 만드려고 합니다. task를 for문으로 순회하며 각각의 요소를
  
  <li> 태그의 텍스트로 만들어 <ul> 태그의 자식으로 추가해주려고 합니다.
  
  최종적으로 Code, Run, Eat, Sleep이 핑크색 화면 안에 나타나도록
  
  코드를 작성해주세요!
  
  🚨 HTML, CSS는 건드리지 않고 JS만 수정해주세요.
  
  
  +-------------------+
  |  <ul>             |
  |    <li>Code</li>  |
  |    <li>Run</li>   |
  |    <li>Eat</li>   |
  |    <li>Sleep</li> |
  |  </ul>            |
  +-------------------+

*/

const task = ["Code", "Run", "Eat", "Sleep"];
const ulElement = document.querySelector("ul");
              
            
!
999px

Console