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

              
                <!-- Read the full post at https://jen4web.substack.com/p/caption -->
 
<h1>Challenge for < caption> and < th></h1>

<p>INSTRUCTIONS: Fork this CodePen and markup the content below.</p>
  <p>This is a similar challenge to yesterday's, but this time we've rearranged the text to group information by day. Can you create a table that shows the schedule grouped by day AND by time, with appropriate descriptive caption and hadings?</p>
 
  <p>Have a peek at <a href="https://codepen.io/jen4web/pen/ZELVjdR?editors=1100" target="_blank">today's CodePen demo</a> for some hints about how we thought about a similar problem.</p>

<p><a href="https://jen4web.substack.com/p/caption-discussion" target="_blank" class="button">Share your answer on Substack</a></p>
<hr> <!-- hr: a thematic break in a section. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr -->
  <h2>Schedule Grouped by Day</h2>
  <table class="example-1">
  <caption>Course schedule</caption>
<tr><td></td>
    <th scope="col">9:25am-10:45am</th>
    <th scope="col">11am - 12:30pm</th>
    <th scope="col">1:10pm - 2:30pm</th>
    </tr>
    <tr><th scope="row">Monday</th>
    <td>I360 Web Design</td>
    <td rowspan=5>Lunch / Study</td>
  <td>I341 Prototyping with Arduino Tools</td>
</tr>
    <tr><th scope="row">Tuesday</th>
    <td>I342 Mobile Programming</td>
      <td>I399 JavaScript</td>
    </tr>
      <tr><th scope="row">Wednesday</th>
    <td>I360 Web Design</td>
    <td>I341 Prototyping with Arduino Tools</td>
    </tr>
    <tr><th scope="row">Thursday</th>
    <td>I342 Mobile Programming</td>
    <td>I399 JavaScript</td>
</tr>
      <tr><th scope="row">Friday</th>
    <td>Makers Lab</td>
      <td></td>
    </tr>
    
    </table>
<hr>
  
  <h2>Schedule Grouped by Time</h2>
<table class="example-2">
  <caption>Course schedule</caption>
    <tr>
    <td></td>
    <th scope="col">Monday</th>
    <th scope="col">Tuesday</th>
    <th scope="col">Wednesday</th>
    <th scope="col">Thursday</th>
    <th scope="col">Friday</th>
  <tr>
    <tr>
      <th scope="row">9:25am&nbsp;-&nbsp;10:45am</th>
      <td>I360 Web Design</td>
      <td>I342 Mobile Programming</td>
      <td>I360 Web Design</td>
       <td>I342 Mobile Programming</td>
      <td>Makers Lab</td>
  </tr>
  <tr>
      <th scope="row">115am - 12:30pm</th>
    <td colspan=5>Lunch / Study</td>
  </tr>
     <tr>
        <th scope="row">1:10pm - 2:30pm</th>
       <td>I341 Prototyping with Arduino Tools</td>
       <td>I399 JavaScript</td>
       <td>I341 Prototyping with Arduino Tools</td>
       <td>I399 JavaScript</td>
       <td></td>
  </tr>

  </table>
  

              
            
!

CSS

              
                /* default styling - you don't need to touch this unless you really want to */
body {
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
}
.button {
  background-color: #eb3b5a;
  padding: 0.5rem 1rem;
  border: 1px solid #eb3b5a;
  border-radius: 30px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 5rem;
}
.button:hover {
  color: #eb3b5a;
  background-color: white;
}
table {
  border-collapse: collapse;
}
td, th {
  border: 1px solid black;
  padding: 0.5em;
  text-align: center;
}

th[scope="col"] {
    background-color: #696969;
    color: #fff;
}
th[scope="row"] {
    background-color: #d7d9f2;
}

caption {
  text-align: left;
  margin-top: 2rem;
  font-weight: bold;
}
.example-1 caption {
  caption-side: bottom;
  margin-top: 0;
  border: 1px solid black;
  border-top: none;
  padding: 0.5rem;
  background-color: #8854d0;
  color: white;
}

.example-1 tr:first-child td:first-child {
  /* first cell in the first row... */
  background-color: black;
}

.example-2 tr:nth-child(even) {
  /* for even number rows... 
  Remember the first row counts, even though it's got th instead of td */
  background-color: #d1d8e0;
}
.example-2 tr:first-child td:first-child {
  /* first cell in the first row... */
  background-color: #8854d0;
}
.example-2 caption {
  caption-side: bottom;
  margin-top: 0;
  border: 1px solid black;
  border-top: none;
  padding: 0.5rem;
  background-color: #339966;
  color: white;
}

              
            
!

JS

              
                /* 

💯 This challenge is certified 100% free of JavaScript. 

ALL THE GOOD STUFF IS IN THE HTML BLOCK :-D

*/
              
            
!
999px

Console