cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

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.

            
              <table>
  <tr>
    <td></td>
    <td>EQUIPOS</td>
    <td>PJ</td>
    <td>PG</td>
    <td>PE</td>
    <td>PP</td>
    <td>GF</td>
    <td>GC</td>
    <td>DG</td>
    <td>PTS</td>
  </tr>
  <tr>
    <td>1</td>
    <td>Alianza Lima</td>
    <td>11</td>
    <td>8</td>
    <td>3</td>
    <td>0</td>
    <td>20</td>
    <td>5</td>
    <td>15</td>
    <td>27</td>
  </tr>
  <tr>
    <td>2</td>
    <td>Sporting Cristal</td>
    <td>11</td>
    <td>8</td>
    <td>2</td>
    <td>1</td>
    <td>27</td>
    <td>13</td>
    <td>14</td>
    <td>26</td>
  </tr>
  <tr>
    <td>3</td>
    <td>Melgar</td>
    <td>12</td>
    <td>7</td>
    <td>3</td>
    <td>2</td>
    <td>16</td>
    <td>9</td>
    <td>7</td>
    <td>24</td>
  </tr>
  <tr>
    <td>4</td>
    <td>Unión Comercio</td>
    <td>12</td>
    <td>6</td>
    <td>1</td>
    <td>5</td>
    <td>17</td>
    <td>13</td>
    <td>4</td>
    <td>19</td>
  </tr>
  <tr>
    <td>5</td>
    <td>Universitario</td>
    <td>12</td>
    <td>5</td>
    <td>3</td>
    <td>4</td>
    <td>13</td>
    <td>12</td>
    <td>1</td>
    <td>18</td>
  </tr>
  <tr>
    <td>6</td>
    <td>Sport Huancayo</td>
    <td>12</td>
    <td>5</td>
    <td>3</td>
    <td>4</td>
    <td>10</td>
    <td>12</td>
    <td>-2</td>
    <td>18</td>
  </tr>
  <tr>
    <td>7</td>
    <td>Cienciano</td>
    <td>12</td>
    <td>5</td>
    <td>2</td>
    <td>5</td>
    <td>16</td>
    <td>18</td>
    <td>-2</td>
    <td>17</td>
  </tr>
  <tr>
    <td>8</td>
    <td>Los Caimanes</td>
    <td>12</td>
    <td>4</td>
    <td>3</td>
    <td>5</td>
    <td>13</td>
    <td>17</td>
    <td>-4</td>
    <td>15</td>
  </tr>
  <tr>
    <td>9</td>
    <td>Real Garcilaso</td>
    <td>12</td>
    <td>3</td>
    <td>5</td>
    <td>4</td>
    <td>15</td>
    <td>14</td>
    <td>1</td>
    <td>14</td>
  </tr>
  <tr>
    <td>10</td>
    <td>León de Huánuco</td>
    <td>11</td>
    <td>4</td>
    <td>2</td>
    <td>5</td>
    <td>15</td>
    <td>16</td>
    <td>-1</td>
    <td>14</td>
  </tr>
  <tr>
    <td></td>
    <td>EQUIPOS</td>
    <td>PJ</td>
    <td>PG</td>
    <td>PE</td>
    <td>PP</td>
    <td>GF</td>
    <td>GC</td>
    <td>DG</td>
    <td>PTS</td>
  </tr>
</table>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
            
          
!
            
              table {
  border-collapse: separate;
  border-spacing: 5px;
  font-family: 'Segoe UI', Arial;
  margin: 10px auto;
}

td {
  padding: 5px;
  text-align: right;
}

/* Filas pares */
tr:nth-child(even) {
  background: LightCyan;
}

/* Filas impares */
tr:nth-child(2n-1) {
  background: Moccasin;
}

/* primera y ultima fila */
tr:nth-child(1),
tr:nth-last-child(1) {
  background: gray;
  color: white;
  font-weight: bold;
  text-align: center;
}

/* Primera columna */
td:first-child {
  text-align: left;
}

/* Segunda columna */
td:nth-child(2) {
  font-weight: bold;
  text-align: left;
}

/* Ultima columna */
td:last-child {
  font-weight: bold;
}

/* Celdas vacias  */
td:empty {
  background: white;
}

/* 2ª fila, última columna */
tr:nth-child(2) td:last-child {    
  background: LightSalmon ;
}
            
          
!
            
              // celdas negativas
$("td:contains('-')").css("color", "red");
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console