首页 > 代码库 > day 14

day 14

标签

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Title</title>
 6 </head>
 7 <body>
 8 <a href="http://www.baidu.com">123</a>
 9 <form enctype="multipart/form-data">
10 
11     <div>
12         <p>请选择性别:</p>
13         男:<input type="radio"  name="aaa" value="1">
14         女:<input type="radio" name="aaa" value="2" checked="checked">
15         <p>请选择爱好:</p>
16         篮球:<input type="checkbox" name="favor" value="1">
17         足球:<input type="checkbox" name="favor" value="2">
18         网球:<input type="checkbox" name="favor" value="3" checked="checked">
19         <p>上传文件</p>
20         <input type="file" name="fname">
21         <input type="submit" value="提交">
22         <textarea name="meno">topaz</textarea>
23         <select name="city" size="10" multiple="multiple">
24             <option value="1">北京</option>
25             <option value="2">上海</option>
26             <option value="3">广州</option>
27         </select>
28         <a href="#i1">第一章</a>
29         <a href="#i2">第二章</a>
30         <div id=i1 style="height:600px">第一章内容</div>
31         <div id=i2 style="height:600px">第二章内容</div>
32         </div>
33 </form>
34 <!--
35 <form action="http://192.168.16.35:8888/index" method="‘POST">
36     <input type="text" name="user"/>
37     <input type="text" name="email"/>
38     <input type="password" name="pwd"/>
39     <input type="submit" value="http://www.mamicode.com/登录">
40 </form>
41 <h1>Topaz</h1>
42 <h2>Topaz</h2>
43 <h3>Topaz</h3>
44 <h4>Topaz</h4>
45 <h5>Topaz</h5>
46 <h6>Topaz</h6>
47 <p>123<br />123</p>
48 <p>456</p>
49 <p>789</p>
50 <span>sss</span>-->
51 </body>
52 </html>

表格

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Title</title>
 6 </head>
 7 <body>
 8 <table border="1">
 9     <thead>
10     <tr>
11         <th>ip</th>
12         <th>端口</th>
13         <th>hostname</th>
14     </tr>
15     </thead>
16     <tbody>
17     <tr>
18         <td colspan="2">ip</td>
19         <td rowspan="2">port</td>
20     </tr>
21     <tr>
22         <td>1.1.1.1</td>
23         <td><a href="1.html">topaz</a></td>
24     </tr>
25     <tr>
26         <td>1.1.1.1</td>
27         <td>80</td>
28         <td>topaz</td>
29     </tr>
30         <tr>
31         <td>1.1.1.1</td>
32         <td>80</td>
33         <td>topaz</td>
34     </tr>
35     </tbody>
36 </table>
37 
38 </body>
39 </html>

label

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Title</title>
 6 </head>
 7 <body>
 8     <label for="username">用户名:</label>
 9     <input id="username" type="text" name="user"/>
10     <fieldset>
11         <legend>登录</legend>
12         <label for="username1">账号</label>
13         <input id="username1" type="text" name="user1" >
14         <br />
15         <label for="pwd">密码</label>
16         <input id="pwd" type="text" name="user"/>
17     </fieldset>
18 
19 
20 </body>
21 </html>

css

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Title</title>
 6     <style>
 7         #i1{
 8             background-color:red;
 9             height:48px
10         }
11     /*  .c1{
12             background-color:red;
13             height:48p
14         }
15         */
16         div{
17             background-color:green;
18             height:48p
19         }
20     </style>
21 
22 </head>
23 <body>
24 <!--    <div id="i1">Topaz</div> #用id重用性差,用class就没问题
25     <div id="i1">hanghang</div>
26 -->
27     <div class="c1">Topaz</div>
28     <span class="c1">TopazTopaz</span>
29     <div class="c1">Hanghang</div>
30 </body>
31 </html>
32 
33 css
34 1.标签的style属性
35 2.写在head里面,style标签中写样式
36     --id选择区
37     --class选择器
38     --标签选择器div,所有div设置成此样式
39     --层级选择器
40     --组合选择器
41 3.注释 /* */

 

day 14