Skip to content

html table with style #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
page link: https://afyaakt.github.io/phase-0-html-tables-lab/
# HTML Tables

## Learning Goals
Expand Down
39 changes: 38 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,46 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<title>HTML Tables</title>
</head>
<body>
<!-- Write your HTML here -->
<table>
<tr>
<th>City</th>
<th>State</th>
<th>2017 estimate</th>
</tr>

<tr>
<td class="city">New York</td>
<td class="state"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTwTGT2zusGJKUvHYgtIH4mSpZxPLgr_AvHzBDuSBuocg&s" alt="">New York</td>
<td class="estimate">8,622,698</td>
</tr>

<tr>
<td class="city">Los Angeles</td>
<td class="state"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Flag_of_California.svg/800px-Flag_of_California.svg.png" alt="">California</td>
<td class="estimate">3,999,759</td>
</tr>

<tr>
<td class="city">Chicago</td>
<td class="state"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Flag_of_Illinois.svg/800px-Flag_of_Illinois.svg.png" alt="">Illinois</td>
<td class="estimate">2,716,450</td>
</tr>

<tr>
<td class="city">Houston</td>
<td class="state"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Flag_of_Texas.svg/800px-Flag_of_Texas.svg.png" alt="">Texas</td>
<td class="estimate">2,312,717</td>
</tr>


</table>

</body>
</html>
34 changes: 34 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
*{
font-size: 1.4rem;
font-family: 'Roboto', sans-serif;
}
table{
display: flex;
justify-content: center;
align-items: center;
border-collapse: collapse;
}
th , td{
border: 1px solid rgb(141, 136, 136);
margin: 0px;
padding: 30px;
}
th{
background-color: rgb(233, 229, 229);
}
.city{
background-color: rgb(167, 221, 247);
color: rgb(16, 19, 175);
font-style: italic;
}
.estimate{
text-align: end;
}
.state{
color: rgb(16, 19, 175);
}
img{
width: 45px;
height: 23px;
margin-right: 5px;
}