Skip to content

Instantly share code, notes, and snippets.

@SLeitgeb
Last active September 24, 2019 06:45
Show Gist options
  • Save SLeitgeb/65a76321043767fb0e864ed15e37bc5a to your computer and use it in GitHub Desktop.
Save SLeitgeb/65a76321043767fb0e864ed15e37bc5a to your computer and use it in GitHub Desktop.
Web cartography lesson 1, example 3

Struktura webové stránky se vytváří pomocí elementů div. Tento element slouží pouze jako kontejner pro další obsah. Pomocí classes a id (tříd a identifikátorů) si pojmenujete jednotlivé části stránky a v CSS určíte jejich vzhled.

Tabulkám table můžete stanovit vnitřní okraje vlastností border např. pomocí selektoru table tr td.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page title</title>
<link rel="stylesheet" type="text/css" href="./style.css">
</head>
<body>
<h1>Or is it?</h1>
<p>You've already familiar with paragraphs.</p>
<ul>
<li>And you've</li>
<li>used some</li>
<li>unordered lists</li>
</ul>
<ol>
<li>Did you know</li>
<li>there were</li>
<li>ordered lists as well?</li>
</ol>
<h2>What if we put this somewhere around here?</h2>
<p>Sometimes you might want to display tabular data:</p>
<table>
<tr>
<td>so</td>
<td>they</td>
<td>can</td>
</tr>
<tr>
<td>deliver</td>
<td>your</td>
<td>message</td>
</tr>
<tr>
<td colspan=3>easily</td>
</tr>
</table>
<div>Use divs to structure the page.
<div>You can nest them if you want. Actually, you can nest <span>a lot of elements.</span>
</div>
</div>
</body>
</html>
body {
background: #333;
}
h1 {
color: blue;
}
h2 {
display: none;
}
table {
border-collapse: collapse;
}
table tr td {
border: 1px solid white;
padding: 5px;
text-align: center;
}
p {
border-top: 1px solid rgb(121, 66, 107);
color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment