zoukankan      html  css  js  c++  java
  • html结构内容拾忆

    文本格式化:

    1 <b>This text is bold</b><!--定义粗体文本。-->
    2 <strong>This text is strong</strong><!-定义加重语气。-->
    3 <big>This text is big</big><!-定义大号字。-->
    4 <em>This text is emphasized</em><!-定义着重文字。-->
    5 <i>This text is italic</i><!-定义斜体字。-->
    6 <small>This text is small</small><!-定义小号字。-->
    7 This text contains<sub>subscript</sub><!-定义下标字。-->
    8 This text contains<sup>superscript</sup><!-定义上标字。-->

    This text is bold 
    This text is strong 
    This text is big 
    This text is emphasized 
    This text is italic 
    This text is small 
    This text contains subscript 
    This text contains superscript

    <p>一打有 <del>二十</del> <ins>十二</ins> 件。</p>
    <!--一同使用,来描述文档中的更新和修正。定义删除字和插入字。大多数浏览器会改写为删除文本和下划线文本。一些老式的浏览器会把删除文本和下划线文本显示为普通文本。-->

    一打有 二十 十二 件。

    计算机输出标签

    <pre>
    for i = 1 to 10
         print i
    next i
    </pre><!--pre 标签很适合显示计算机代码-->
    for i = 1 to 10
         print i
    next i
    <code>Computer code</code><!--定义计算机代码。-->
    <kbd>Keyboard input</kbd><!--定义键盘码。-->
    <tt>Teletype text</tt><!--定义打字机代码。-->
    <samp>Sample text</samp><!--定义计算机代码样本。-->
    <var>Computer variable</var><!--定义变量。-->

    Computer code 
    Keyboard input 
    Teletype text 
    Sample text 
    Computer variable 

    注释:这些标签常用于显示计算机/编程代码。

    引用、引用和术语定义

    The <abbr title="People's Republic of China">PRC</abbr> was founded in 1949.<!--定义缩写。使用全局的 title 属性,这样就能够在鼠标指针移动到 <abbr> 元素上时显示出简称/缩写的完整版本。-->
    <acronym title="World Wide Web">WWW</acronym><!--定义首字母缩写。-->
    <address>
    Written by <a href="mailto:webmaster@example.com">Donald Duck</a>.<br> 
    Visit us at:<br>
    Example.com<br>
    Box 564, Disneyland<br>
    USA
    </address><!--定义文档或文章的作者/拥有者的联系信息。不应该用于描述通讯地址,除非它是联系信息的一部分。-->
    <bdo dir="rtl">Here is some text</bdo><!--定义文字方向。-->
    <blockquote cite="http://www.wwf.org">
    WWF's ultimate goal is to build a future where people live in harmony with nature.
    </blockquote><!--定义长的引用。cite规定引用的来源。主流浏览器均不支持 cite 属性。不过,搜索引擎可能会使用该属性获得更多有关引用的信息。-->
    <p>Here comes a short quotation: <q>This is a short quotation</q></p><!--定义短的引用语。-->
    <cite><!--定义引用。可使用该标签对参考文献的引用进行定义,比如书籍或杂志的标题。-->

    PRC was founded in 1949.
    WWW
    Written by Donald Duck.(点击进入email)
    Visit us at:
    Example.com
    Box 564, Disneyland
    USA
    txet werbeH emos si ereH
      WWF's ultimate goal is to build a future where people live in harmony with nature.
    Here comes a short quotation: "This is a short quotation"

     链接

    <a href="http://www.w3school.com.cn/">Visit W3School</a>
    <a href="http://www.w3school.com.cn/" target="_blank">Visit W3School!</a><!--在新的浏览器窗口打开链接-->
    <a name="label">锚(显示在页面上的文本)</a><!--链接到同一个页面的不同位置-->
    <a href="/index.html"  target="_top">请点击这里!</a><!--跳出框架--> 
    <a href="mailto:someone@microsoft.com?subject=Hello%20again">发送邮件</a><!--链接到一个邮箱,安装本地邮箱-->
    <a href="mailto:someone@microsoft.com?cc=someoneelse@microsoft.com&bcc=andsomeoneelse2@microsoft.com&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!">发送邮件!</a><!--链接到一个邮箱,安装本地邮箱-->

    图像:align控制图片在文本中的位置,bottom、middle、top、left、right; alt显示替换文本;

    图像映射:

     1 <html>
     2 <body>
     3 
     4 <p>请点击图像上的星球,把它们放大。</p>
     5 
     6 <img
     7 src="/i/eg_planets.jpg"
     8 border="0" usemap="#planetmap"
     9 alt="Planets" />
    10 
    11 <map name="planetmap" id="planetmap">
    12 
    13 <area
    14 shape="circle"
    15 coords="180,139,14"
    16 href ="/example/html/venus.html"
    17 target ="_blank"
    18 alt="Venus" />
    19 
    20 <area
    21 shape="circle"
    22 coords="129,161,10"
    23 href ="/example/html/mercur.html"
    24 target ="_blank"
    25 alt="Mercury" />
    26 
    27 <area
    28 shape="rect"
    29 coords="0,0,110,260"
    30 href ="/example/html/sun.html"
    31 target ="_blank"
    32 alt="Sun" />
    33 
    34 </map>
    35 
    36 <p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。</p>

    表格<caption>表格标题;<col>表格列的属性;<colgroup>表格列的组。colspan并列数属性;rowspan并列行属性。cellpadding单元格内容与其边框之间的空白;cellspacing增加单元格之间的距离。

    列表<ol>定义有序列表。<ul>定义无序列表。<li>定义列表项。<dl>定义定义列表。<dt>定义定义项目。<dd>定义定义的描述。

    表单<form> accept-charset规定服务器可处理的表单数据字符集(UTF-8 - Unicode 字符编码,ISO-8859-1 - 拉丁字母表的字符编码,gb2312 - 简体中文字符集)。action:规定当提交表单时向何处发送表单数据(绝对 URL和相对 URL)。autocomplete:规定是否启用表单的自动完成功能(on、off)。enctype:规定在发送表单数据之前如何对其进行编码(application/x-www-form-urlencoded:在发送前编码所有字符(默认);multipart/form-data:不对字符编码,在使用包含文件上传控件的表单时,必须使用该值;text/plain:空格转换为 "+" 加号,但不对特殊字符编码。)。method:规定用于发送 form-data 的 HTTP 方法(get:浏览器会与表单处理服务器建立连接,然后直接在一个传输步骤中发送所有的表单数据:浏览器会将数据直接附在表单的 action URL 之后;这两者之间用问号进行分隔;post:浏览器将与 action 属性中指定的表单处理服务器建立联系,一旦建立连接之后,浏览器就会按分段传输的方法将数据发送给服务器。)。target:(_blank:在新窗口中打开;_self:默认。在相同的框架中打开;_parent:在父框架集中打开;_top:在整个窗口中打开;framename:在指定的框架中打开)。name:name 属性提供了一种在脚本中引用表单的方法。novalidate:如果使用该属性,则提交表单时不进行验证。

    <input> type:button、checkbox、file、hidden、image、password、radio、reset、submit、text和color、datetime、date、datetime-local、email、month、number、range、search、time、url、weekaccept:规定通过文件上传来提交的文件的类型(accept="image/gif,image/jpeg",accept="image/*")。autocomplete: 属性规定输入字段是否应该启用自动完成功能。autofocus:规定输入字段在页面加载时是否获得焦点。checked:规定此 input 元素首次加载时应当被选中。disabled:当 input 元素加载时禁用此元素。form:规定输入字段所属的一个或多个表单(<input type="text" name="lname" form="nameform" />)。formaction覆盖表单的 action 属性(<input type="submit" formaction="demo_admin.asp" value="Submit as admin" />)。formenctypeformmethodformnovalidateformtargetlist:引用包含输入字段的预定义选项的 datalist (如:

    1 <form action="demo_form.asp">
    2 Webpage: <input type="url" list="url_list" name="link" />
    3 <datalist id="url_list">
    4 <option label="W3Schools" value="http://www.w3schools.com" />
    5 <option label="Google" value="http://www.google.com" />
    6 <option label="Microsoft" value="http://www.microsoft.com" />
    7 </datalist>
    8 <input type="submit" />
    9 </form>

    )。multiple:如果使用该属性,则允许一个以上的值。pattern:规定输入字段的值的模式或格式regexp_patternplaceholder:规定帮助用户填写输入字段的提示。readonly:规定输入字段为只读。required:指示输入字段的值是必需的。size属性定义的是可见的字符数。max:规定输入字段的最大值。min:规定输入字段的最小值。maxlength属性规定输入字段的最大长度,以字符个数计。step:规定输入字的的合法数字间隔。

    <textarea>

    <lable> 定义一个控制的标签。forid)规定 label 绑定到哪个表单元素。<label for="male">Male</label><input type="radio" name="sex" id="male" />

    <fieldset> 定义域。<legend>定义域的标题

    1 <form>
    2   <fieldset>
    3     <legend>health information</legend>
    4     height: <input type="text" />
    5     weight: <input type="text" />
    6   </fieldset>
    7 </form>

    <optgroup>定义选项组。<option>定义下拉列表中的选项

     1 <select>
     2   <optgroup label="Swedish Cars">
     3     <option value ="volvo">Volvo</option>
     4     <option value ="saab">Saab</option>
     5   </optgroup>
     6 
     7   <optgroup label="German Cars">
     8     <option value ="mercedes">Mercedes</option>
     9     <option value ="audi">Audi</option>
    10   </optgroup>
    11 </select>

    <button><button type="button">Click Me!</button>

    框架frameset  frame src  rows="50%,50%" cols="25%,75%"  noresize="noresize"。

    内联框架:iframe frameborder:规定是否显示框架周围的边框(0和1)。longdesc:规定一个页面,该页面包含了有关 iframe 的较长描述(url .txt)。marginheight:定义 iframe 的顶部和底部的边距。marginwidth:定义 iframe 的左侧和右侧的边距。sandbox:启用一系列对 <iframe> 中内容的额外限制(allow-forms、allow-same-origin、

    allow-scripts、allow-top-navigation)。scrolling:(yes、no、auto)。seamless:规定 <iframe> 看上去像是包含文档的一部分。srcdoc属性规定页面的 HTML 内容显示在行内框架中,与 sandbox 和 seamless 属性一同使用。

  • 相关阅读:
    HTML Style Sheet
    Chrome 崩溃 相关
    android dialog 不变暗
    URL replacement
    android SharedPreferences
    android PreferenceActivity
    据说还可以的网站
    android brightness control
    Android network status 3G/WIFI
    android activity onSearchRequested()
  • 原文地址:https://www.cnblogs.com/jymz/p/3998710.html
Copyright © 2011-2022 走看看