Hice una tabla usando | nombre | datos|
Quiero que la celda nombre pueda agregar Color. Cómo se hace ?
If you only need to use one background color, you can override the default th
element styles, like this:
<style> .myTable th { background:red; font-weight:normal; } </style>
|myTable|k
|! name | data|
Notes:
- The CSS definition for
.mytable th { ... }
sets the color and font-weight for ath
table element. - The first line of the table –
|myTable|k
– assigns themyTable
class to the entire table. Note that this does not actually create a table row… it is just used to set the class name. - The leading
!
at the start of the “name” cell changes that cell from atd
element to ath
element, which causes it to use the CSS attributes previously defined in the<style>...</style>
enjoy,
-e
2 Likes