<tr>
<th rowspan="2"></th>
<th colspan="2"></th>
</tr>
<tr>
<th></th>
<th> </th>
</tr>
<tr>
<td>Mozilla Firefox</td>
<td>126</td>
<td>59%</td>
</tr>
<tr>
<td>Google Chrome</td>
<td>78</td>
<td>30%</td>
</tr>
<tr>
<td>Safari</td>
<td>34</td>
<td>11%</td>
</tr>
</table>
</body>
</html>
table {
border-collapse: collapse;
border: 2px solid black;
}
td {
padding: 5px;
padding-right: 10px;
border: 1px solid lightgray;
color: brown;
background-color: lightyellow;.
}
th {
padding: 10px;
border: 1px solid black;
color: darkblue;
background-color: lightcyan;
}
caption {
margin-bottom: 10px;
font-size: 18px;
}
[20/23]
- CSS. , , th td, . -, - -.
, - , , ? . , :
my-class { }. , .
Table/table20.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
.row-1 {
background-color: pink;
}
.row-2 {
background-color: lightgreen;
}
.row-3 {
background-color: lightblue;
}
table {
border-collapse: collapse;
border: 2px solid black;
}
td {
padding: 5px;
padding-right: 10px;
border: 1px solid lightgray;
}
th {
padding: 10px;
border: 1px solid black;
}
caption {
margin-bottom: 10px;
font-size: 18px;
}
</style>
</head>
<body>
<table>
<caption> </caption>
<tr>
<th rowspan="2"></th>
<th colspan="2"></th>
</tr>
<tr>
<th></th>
<th> </th>
|
|
</tr>
<tr class="row-1">
<td>Mozilla Firefox</td>
<td>126</td>
<td>59%</td>
</tr>
<tr class="row-2">
<td>Google Chrome</td>
<td>78</td>
<td>28%</td>
</tr>
<tr class="row-3">
<td>Safari</td>
<td>34</td>
<td>13%</td>
</tr>
</table>
</body>
</html>
[21/23]
. , .
CSS , . , CSS.
, , , , .
CSS- width, height, :
table { width: 100px; height: 100px;}, , 20px, , 20%.
, -.
auto . , width: auto; height: auto;.
. .
: [23/23]
! . . , 95% .
, . , , .
:
1. body .
2. : darkcyan, lightblue, lightyellow, lightgray, black, white.
3. : 33%.
4. 5.
5. CSS- color.
6. caption .
Table/table23.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>: </title>
</head>
<body>
<h1> </h1>
<style>
body {
width: 350px;
margin: 0;
padding: 0 10px;
font-size: 14px;
font-family: Arial, sans-serif;
}
table {
border-collapse: collapse;
}
th {
width:33%;
color: white;
border-top: 1px solid black;
border-bottom: 1px solid black;
padding: 10px;
}
.cell-1 {
background-color: darkcyan;
text-align:left;
}
.cell-2 {
background-color: lightblue;
text-align: center;
}
.cell-3 {
background-color: darkcyan;
text-align: right;
}
td {
padding: 10px;
}
.row-1 {
border-bottom: 1px solid lightgrey;
}
.row-2 {
background-color: lightyellow;
border-bottom: 1px solid lightgrey;
}
</style>
<table>
|
|
<tr>
<th class="cell-1"></th>
<th class="cell-2"></th>
<th class="cell-3">%</th>
</tr>
<tr>
<td class="row-1"></td>
<td class="row-1" style="text-align: center;">199</td>
<td class="row-1" style="text-align: right;">65.12</td>
</tr>
<tr>
<td class="row-2"></td>
<td class="row-2" style="text-align: center;">69</td>
<td class="row-2" style="text-align: right;">21.3</td>
</tr>
<tr>
<td class="row-1"></td>
<td class="row-1" style="text-align: center;">5</td>
<td class="row-1" style="text-align: right;">8</td>
</tr>
<tr>
<td colspan="2" class="row-2"> </td>
<td class="row-2" style="text-align: right;">273</td>
</tr>
</table>
</body>
</html>
[1/18]
, - -, : , , . , .
, <form>, . <form> :
action , URL, ;
method .
:
<form action="https://echo.htmlacademy.ru" method="get">
</form>
get post. method, get.
get , . :
https://www.google.com/search? q=htmlacademy
get , -.
post HTTP- , . , .
form / form 1. html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> form</title>
<style>
<h1 {
font-size: 18px;
}
</style>
</head>
<body>
<h1> </h1>
<!-- ->
<form action="https://echo.htmlacademy.ru" method="post">
</form>
</body>
</html>
[2/18]
input. :
type ;
name .
, . text, . . :
<form action="https://echo.htmlacademy.ru" method="get">
<input type="text" name="search">
</form>
, . , , . .
form/ form2.html
|
|
[3/18]
id . , .
, , , . . , , . JavaScript .
. , , , .
value . .
, - , . , value .
Form/form3.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
h1 {
font-size: 18px;
}
</style>
</head>
<body>
<h1> </h1>
<form action="https://echo.htmlacademy.ru" method="post">
<input type="text" name="total" id="total-field" value="5"> .
</form>
</body>
</html>
[4/18]
, . :
<input type="text" name="username">
, , .
, : !. <label>.
. , .
<label> . .
<label>, :
<label>
<input type="text" name="username">
</label>
, <label> , .
id [5/18]
<label> . , .
id. :
1. id.
2. <label>.
3. <label> for.
4. for , id .
:
<label for=" user-field-id "> </label>
...
-
...
<input id=" user-field-id " type="text" name="username">
form/form5.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> id</title>
<style>
table {
border-collapse: collapse;
}
td {
padding: 10px;
|
|
border: 1px solid #ccc;
}
tr:nth-child(n+2) {
color: #ccc;
}
</style>
</head>
<body>
<h1> </h1>
<form action="https://echo.htmlacademy.ru" method="post">
<table>
<tr>
<td>
<label for="login-field">
</label>
</td>
<td>
<input type="text" name="login" id="login-field">
</td>
</tr>
<tr>
<td></td>
<td> </td>
</tr>
<tr>
<td></td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
[6/18]
, <label>. id for.
form/form6.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
h1 {
font-size: 18px;
}
</style>
</head>
<body>
<h1> </h1>
<form action="https://echo.htmlacademy.ru" method="post">
<label for="login-field"> </label>
<input type="text" name="login" id="login-field">
<br><br>
<label for="password-field">
<!-- ->
</label>
<!-- -><input type="text" name="password" id="password-field">
</form>
</body>
</html>
[7/18]
. . , .
, , type password.
[8/18]
. . <input> c submit.
value. . , .
, , . , . , , .
form/form8.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
h1 {
font-size: 18px;
}
</style>dtyle>
</head>
<body>
<h1> </h1>
<form action="https://echo.htmlacademy.ru" method="post">
<label for="login-field"> </label>
<input type="text" name="login" id="login-field">
<br><br>
<label for="password-field"> </label>
<input type="password" name="password" id="password-field">
<br><br>
<input type="submit" value="">
<!-- ->
</form>
</body>
</html>
[9/18]
. .
<textarea>. name id, .
rows . cols . .
|
|
value , -. , <textarea> . :
<textarea> </textarea>
form/form9.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
input[type="submit"]
{
display: block;
margin-top: 10px;
}
</style>
</head>
<body>
<h1></h1>
<form action="https://echo.htmlacademy.ru" method="post">
<p> </p>
<p> :</p>
<textarea name="comment" id="comment-field" rows="10">
</textarea>
<input type="submit" value="">
</form>
</body>
</html>
[10/18]
- <input> checkbox.
, . , , , . , value .
, checked. :
<input type="checkbox" checked>
. , .
form/form10.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
input[type="submit"]
{
display: block;
margin-top: 10px;
}
</style>
</head>
<body>
<h1></h1>
<form action="https://echo.htmlacademy.ru" method="post">
<p> </p>
<p> :</p>
<input type="checkbox" name="subscribe" id="subscribe-field" checked>
<!-- ->
<label for="subscribe-field"> ?</label>
<input type="submit" value="">
</form>
</body>
</html>
: [11/18]
.
:
HTML-.
<br>.
, cols .
rows.
, , .
form/ form11.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>: </title>
<style>
html, body {
margin: 0;
padding: 0;
}
body {
width: 350px;
padding: 10px 20px;
color: black;
font-family: Arial, sans-serif;
font-size: 14px;
line-height: 1.5;
}
h1 {
margin: 0;
}
</style>
</head>
<body>
<h1></h1>
<form action="https://echo.htmlacademy.ru" method="post">
(email):<br>
<input type="text" name="login" id="login-field"><br>
:<br>
<input type="password" name="password" id="password-field"><br>
:<br>
<textarea name="comment" id="commrnt-field" rows="3">
</textarea><br>
<input type="checkbox" name="subscribe" id="subscribe-field" checked>
<br>
<input type="submit" value="">
</form>
</body>
</html>
[12/18]
- <input> radio.
. , c value.
, value . value .
.
form/form12.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<style>
input[type="submit"] {
display: block;
margin-top: 10px;
}
</style>
</head>
<body>
<h1></h1>
<form action="https://echo.htmlacademy.ru" method="post">
<p> .</p>
<p><i> ?</i></p>
<label>
<input type="radio" name="question-one" value="p">