前端(第十九天):HTML网页技术;

一,什么是前端

前端位于程序的首要开发内容,直接和用户打交道,是超文本标记语言,用来完成一个静态网页,

二,基本架构

结构:由大量的标签组成,标签都是成对出现的

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" /><!-- 设置了编码值 -->
        <title></title><!-- 设置了标题 -->
    </head>
    <body><!-- 体部分,指定网页要展示的内容 -->
        
    </body>
</html>

三,标签

1.<br/>:换行(自闭标签)

2.&nbsp;:换行

3.<h1></h1>(1~6):标题

4.     <ul>
            <li>唐僧</li>
            <li>孙悟空</li>
            <li>猪八戒</li>:无序列表
            <li>沙悟净</li>
        </ul>

5.<ol>
            <li>唐僧</li>
            <li>孙悟空</li>
            <li>猪八戒</li>:有序列表
            <li>沙悟净</li>
        </ol>

6.<img src="img/8534059.jpg" width="400px" height="400px">:引入图片,及设置大小;

7.<a href="most.html" target="_blank">点</a>:超链接,跳转,target="_blank":用新窗口打开;

8.<a href="#dop">回到底部</a>
    <a name="top">我是顶部</a>锚定

<a href="#top">回到顶部</a>
        <a name="dop">我是底部</a>

9.<!-- input 输入框 -->
        <input type="text" /></br><!-- 普通文本框 -->
        <input type="password" /></br><!-- 密码 -->
        <input type="radio" /></br><!-- 单选框 -->
        <input type="number" /></br><!-- 数字值 -->
        <input type="week" /> </br><!-- 日历-->
        <input type="checkbox"/></br><!-- 复选框 -->
        <input type="button" /></br>
        <input type="submit" />

10.表格

<table border="cellspacing">
            <tr>
                <td>1</td>
                <td>2</td>
                <td>3</td>
            </tr>
            <tr>
                <td>4</td>
                <td>5</td>
                <td>6</td>
            </tr>
            <tr>
                <td>7</td>
                <td>8</td>
                <td>9</td>
            </tr>
        </table>

11,合并单元格

<body>
        <!-- colspan:列合并 rowspan 行合并 -->
        <table bgcolor="bisque" border="2px" widtd="300px">
           <tr>
                <td colspan="2">1</td>
                <td>3</td>
            </tr>
            <tr>
                <td>4</td>
                <td>5</td>
                <td rowspan="9">6</td>
            </tr>
            <tr>
                <td>7</td>
                <td>8</td>
            </tr>
        </table>

12.表单标签应用

<h1>注册表单</h1>
        <form method=“post” action=“#”>
            <table width="500px" border="2px" bgcolor="azure" cellspacing="0">
                <tr>
                    <td>用户名</td>
                    <td><input type="text" /></td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><input type="password" /></td>
                </tr>
                <tr>
                    <td>确认密码</td>
                    <td><input type="password" /></td>
                </tr>
                <tr>
                    <td>昵称</td>
                    <td><input type="text" /></td>
                </tr>
                <tr>
                    <td>邮箱</td>
                    <td><input type="email" /></td>
                </tr>
                <tr>
                    <td>性别</td>
                    <td><input type="radio" />男<input type="radio" />女</td>
                </tr>
                <tr>
                    <td>爱好</td>
                    <td><input type="checkbox" />篮球<input type="checkbox"/>足球<input type="checkbox"/>排球</td>
                </tr>
                <tr>
                    <td>城市</td>
                    <td>
                        <select>
                            <option>--请选择--</option>
                            <option>北京</option>
                            <option>上海</option>
                            <option>广州</option>
                            <option>深圳</option>
                            <option>淮北</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>头像</td>
                    <td><input type="file" /></td>
                </tr>
                <tr>
                    <td>验证码</td>
                    <td><input type="test" />
                    <img src="img/wa.png" />
                    <button>换一张</button>
                    </td>
                </tr>
                <tr>
                    <td>自我描述</td>
                    <td><textarea>自我描述</textarea></td>
                </tr>
                <tr>
                    <td colspan="2"><center><input type="button" value="提交"/><input type="reset" value="重置"/></center></td>
                    
                </tr>
            </table>
        </form>

13,form标签

form标签用来把页面填写的数据交给后台的java程序

提交数据有两种方式:get 和post

区别:get方式提交数据是在地址栏,默认方式,安全性底,长度受限(可以看到提交的数据)

        post方式提交数据不在地址栏,安全性高,没有上限(看不到提交的数据)

method方式提交数据不在地址栏,安全性高

14table标签

select用来定义一个下拉框。option标签用来定义选项

testarea用来描述一个大的文本框

button标签用来表示一个按钮

src属性用来定义图片的位置

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员慕慕

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值