web基础,用html元素制作web页面

用div,form制作登录页面,尽可能做得漂亮。

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>MIS</title>
</head>
<body>
<h1>MIS问答平台</h1>

<hr>
<div id="container" style="width: 400px">
    <div id="header" style="background-color: aquamarine"><h2 align="center" style="margin-bottom: 0;">登录</h2></div>

<div id="content" style="background-color: #EEEEEE;height: 150px;width: 400px;float: left;">
    <form action="">
      Username:<input type="text" name="user"><br>
            Password:<input type="password" name="password">
            <br>
        <input type="radio" name="role" value="stu">学生
        <input type="radio" name="role" value="stu">教师
        <br>
            <input type="button" value="登录">
            <input type="button" value="取消">
    </form>
</div>
    <div id="footer" style="background-color: #FFA500;clear: both;text-align: center;">版权 © duym</div>
</div>
<hr>

</body>
</html>

 

练习使用下拉列表选择框,无序列表,有序列表,定义列表。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MIS</title>
</head>
<body>
<h1>MIS问答平台</h1>

<hr>
<div id="container" style="width: 400px">
<div id="header" style="background-color: aquamarine"><h2 align="center" style="margin-bottom: 0;">列表</h2></div>

<div id="content" style="background-color: #EEEEEE;height: 150px;width: 400px;float: left;">
<form>
<select>
<option>问答</option>
<option>收藏</option>

</select>
</form>
<ul>
<li>python</li>
<li>css</li>
</ul>
<ol>
<li>python</li>
<li>css</li>
</ol>
</div>
<div id="footer" style="background-color: #FFA500;clear: both;text-align: center;">版权 © duym</div>
</div>
<hr>

</body>
</html>

 

观察常用网页的HTML元素,在实际的应用场景中,用已学的标签模仿制作。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>MIS</title>
</head>
<body>
<h1>MIS问答平台</h1>

<hr>
<div id="container" style="width: 400px">
    <div id="header" style="background-color: aquamarine"><h2 align="center" style="margin-bottom: 0;">教务处</h2></div>

<div id="content" style="background-color: #EEEEEE;height: 150px;width: 400px;float: left;">

     <dl>
                  <dt>相关栏目</dt>
                      <dd>日常监控</dd>
                      <dd>课表管理</dd>
                      <dd>学籍管理</dd>
                      <dd>教材管理</dd>
     </dl>
</div>
    <div id="footer" style="background-color: #FFA500;clear: both;text-align: center;">版权 © duym</div>
</div>
<hr>

</body>
</html>

 

posted on 2017-10-13 14:51  020吴惠琳  阅读(304)  评论(0)    收藏  举报