Search

0205_테이블컬러

대분류
CSS2
소분류
CSS2
개념
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> table { border-collapse: collapse; } table, td, th { border: 1px solid black; } th { background-color: green; color: white; } </style> </head> <body> <table> <tr> <th>이름</th> <th>이메일</th> </tr> <tr> <td>김철수</td> <td>chul@google.com</td> </tr> <tr> <td>김영희</td> <td>young@google.com</td> </tr> </table> </body> </html>
HTML
복사