Done with details tag

This commit is contained in:
Tapas Adhikary 2020-08-13 10:30:06 +05:30
parent 01c9814af4
commit f4933b9804
3 changed files with 102 additions and 0 deletions

53
details/index.html Normal file
View file

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>HTML Tips and Tricks - Details Tag</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='../main.css'>
</head>
<body>
<div class="demo">
<h1>Details Tag</h1>
<details>
<summary>Click Here to the user details</summary>
<table>
<tr>
<th>#</th>
<th>Name</th>
<th>Location</th>
<th>Job</th>
</tr>
<tr>
<td>1</td>
<td>Adam</td>
<td>Huston</td>
<td>UI/UX</td>
</tr>
<tr>
<td>2</td>
<td>Bob</td>
<td>London</td>
<td>Machine Learning</td>
</tr>
<tr>
<td>3</td>
<td>Jack</td>
<td>Australia</td>
<td>UI Designer</td>
</tr>
<tr>
<td>4</td>
<td>Tapas</td>
<td>India</td>
<td>Blogger</td>
</tr>
</table>
</details>
</div>
</body>
</html>

21
index.html Normal file
View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>HTML Tips and Tricks</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
</head>
<body>
<div class="demo">
<h1>My Favorite HTML Tips and Tricks</h1>
<ul class="list">
<li>
<a href='./details/index.html'>
Details Tag</a> - Specify details that the user can open and close on demand
</li>
</ul>
</div>
</body>
</html>

28
main.css Normal file
View file

@ -0,0 +1,28 @@
body {
background-color: #000000;
color: #ffffff;
}
a {
color: #61dafb;
}
table {
border-collapse: collapse;
width: 100%;
}
th,
td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
.demo {
margin: 30px auto 30px auto;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}