记html乱起八糟的

来源:互联网 发布:king crimson 知乎 编辑:程序博客网 时间:2024/05/26 08:43

1.ul  unordered  lists

   ol  ordered lists

   li list item

<ul>

<li></li>

<li></li>

</ul>


2.dl definition lists

   dt definition term

   dd definition description

  <dl>

<dt>subjects</dt>

<dd>java</dd>

<dd>c++</dd>

<dt>hobbies</dt>

<dd>basketball</dd>

<dd>piano</dd>

  </dl>


3.单双标签

h1,h2...h6    -------   双标签  !!!!!!!!!!!!!!!!

hr   ------------------    单标签!

 单标签:

<br><hr><img><input><param><meta><link>

双标签:

<html><head><title><body><table><tr><td><span><p><form>

<h1><h2><h3><h4><h5><h6><object><style><b><u><strong>

<i><div><a><script><center>


4.a标签

两个功能:1.连接其他资源

A. href属性 : 指向某个资源地址, 通常有以下几种协议:

1.1 http协议 <a href = "http://www.baidu.com">click me </a>

1.2 邮件协议  mailto <a href = "mailto:123@163.com">click me </a>

1.3 迅雷 thunder <a href = "thunder://downloadCrazyAnimalCity.avi">click me </a>

                        B. target 属性

1.1 _blank : 在空白页面上打开

1.2 _self : 在当前页面打开

1.3 _parent: 在父页面打开

1.4 _top: 在外层页面打开

2.页面定位

5.img标签

5.1 alt 属性: 对图片进行描述

5.2 src 属性 : 指向图片地址


6.框架标签 frameset

!!!!!!!!!! frameset不能喝body标签在同一个html中出现   !!!!!!!!!!!!!!!!!!!!!

<frameset rows="15%, *">

      <frame src="top.html">

      <frameset cols="25%, *">

<frame src = "left.html">

<frame src = "right.html">

     </frameset>

</frameset>


将一个页面分为上部分,占15%,剩余的部分继续分为左右两部分


7.表单标签

<!--

    表单标签:form

        action:它的属性值是书写具体form中的数据给哪个服务器提交的服务器地址(URL)

        method:form表单中的数据的提交方式,提交方式有7种,但现在只有2种常用。

            get

            post

    重点:

        form表单中的数据有的是需要用户输入的,有的是需要用户选择的。

            input type="text" 普通的文本框,是让用户输入数据,输入的数据可以看到

            input type="password" 普通的文本框,让用户输入数据,但是输入的数据会屏蔽

            input type="radio" 让用户选择的单选按钮

            input type="checkbox" 让用户选择的复选框

            input type="submit" 它是一个按钮,可以把form表单中的数据提交给指定的服务器

            input type="reset" 重置,把页面上用户输入的数据重置到默认状态

            input type="file" 选择上传的文件

            input type="button" 普通的按钮 ,默认点击没有任何的效果

            input type="hidden" 主要是在页面上隐藏数据,在提交的时候会被提交,但是用户在页面上看不到

            <input type="image" src="imgs/2.jpg"/>

               默认和submit效果一致,可以把form表单中的数据提交给服务器

               

            下拉框:select

                需要选择的每一项,使用option标签封装

            文本区域:textarea,其中的rows="5"表示的文本区域默认的行 cols="40" 每行默认的列数

   -->

   <formaction="http://www.baidu.com"method="get">

       用户名:<inputtype="text"/><br/>

       密码:<inputtype="password"/><br/>

       性别:<inputtype="radio"/>

           <inputtype="radio"/><br/>

       爱好:<inputtype="checkbox"/>Java

           <inputtype="checkbox"/>IOS

           <inputtype="checkbox"/>Android<br/>

      

       选择靓照:<inputtype="file"/><br/>

       <inputtype="button"value="没反应的破按钮"/>

       <inputtype="hidden"value="隐藏的数据,在页面不显示"/><br/>

       <!--  input type="image"src="imgs/2.jpg"/> <br/>-->

       选择国籍:

           <select>

               <option>--请选择国籍--</option>

               <option>中国</option>

               <option>美国</option>

               <option>英国</option>

           </select><br/>

       自我描述:

           <textarearows="5"cols="40"></textarea><br/>

       <inputtype="submit"/>

       <inputtype="reset"/>

   </form>

针对页面上的单选按钮,必须要求它们的name属性值是相同

       针对select标签,name属性需要书写在select标签上,value值需要书写在每个option标签上

8.

    <title>表单的细节</title>

    <!--

        meta 标签中的http-equiv一般是在控制页面的行为,或者给搜索引擎使用

        http-equiv="keywords" 它表示后面的content的属性值是一些关键字

            content 中书写的关键字,是给搜索引擎使用。

        http-equiv="description" 当前页面的描述

            content 描述的内容

        http-equiv="content-type" 设置当前浏览器的编码表,主要是当前浏览器在解析html文件时采用什么编码表

            content="text/html; charset=UTF-8"当前的文件是文本文件,内容的html,使用utf-8解析

     -->

    <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3">

    <metahttp-equiv="description"content="this is mypage">

    <metahttp-equiv="content-type"content="text/html;charset=utf-8">

9.div和span标签只封装数据,不提供样式,css提供样式



0 0
原创粉丝点击