html初體驗#1

html的一些自看法

  • html 5 自帶語義化,就是讓標籤帶上感情色彩,方便人或瀏覽器區分
  • <b></b><strong></strong>的區別

    圖片描述javascript

    <b> 的默認樣式只是將文本加粗
    <strong> 在默認樣式上和 <b> 同樣,將文本加粗
    可是 <strong> 在語義上更爲強烈,方便瀏覽器或開發人員識別重點
  • <i></i><em></em>的區別css

    同上
  • 內聯和塊元素由 css(display: block/inline) 控制
    一般說的內聯元素、塊元素都是標籤自帶的默認 display 樣式
  • 經常使用的標籤解釋html

    alt           可選內容,加載失敗用這個代替
    src           路徑
    <img>         圖片
    <hr>          水平分割線
    <br>          強制換行
    <nav></nav>   導航
    <main></main> 主要內容
    <noscript></noscript> 瀏覽器不支持js時顯示的內容
  • 最最完整的<head>標籤metalinktitlestylescriptnoscriptbasehtml5

    <meta charset="utf-8">
    <meta name="author" content="xxx">
    <meta name="keyword" content="xxx">
    <meta name="discription content="xxx">
    
    <link rel="stylesheet" href="xxx/xxx.css">
    <script src="xxx/xxx.js">
  • 空標籤就是只須要一個開始標籤就能夠了,不須要結束標籤的標籤
  • 可替換標籤(元素)就是在沒有css制定的渲染下,標籤自己的樣式渲染由瀏覽器來決定的標籤(元素)
  • w3c 一個編寫web各類規範的組織,任何人都能參與並書寫
  • mdn 2005年mozilla發起的收集各類web規範的網站(項目)
  • 關於html全部的標籤(https://www.w3.org/html/wiki/...java

    The root element
    
        <html>
    
    Document metadata
    
        <head>    <title>    <base>    <isindex>
        <link>    <meta>     <style>
    
    Scripting
    
        <script>    <noscript>
    
    Sections
    
        <body>     <section>    <nav>      <article>    <aside>
        <h1>       <h2>         <h3>       <h4>         <h5>       <h6>
        <hgroup>   <header>     <footer>   <address>
    Grouping content
        
        <p>        <hr>            <pre>    <blockquote>
        <ol>       <ul>            <li>     <dl>            <dt>    <dd>
        <figure>   <figcaption>    <div>    <center>
    
    Text-level semantics
    
        <a>       <em>           <strong>    <small>      <s>        <cite>    <q>  <dfn>
        <abbr>    <time>         <code>      <var>        <samp>
        <kbd>     <sub>、<sup>   <i>         <b>
        <mark>    <ruby>         <rt>        <rp>         <bdo>
        <span>    <br>           <wbr>       <tt>         <u>        <strike>
        <big>     <basefont>     <font>      <acronym>    <blink>    <marquee>
        <nobr>    <spacer>       <listing>   <xmp>        <nextid>
    
    Edits
    
        <ins>    <del>
    Embedded content
    
        <img>      <iframe>      <embed>       <object>      <param>
        <video>    <audio>       <source>      <track>       <canvas>
        <map>      <area>        <math>        <svg>         <applet>
        <frame>    <frameset>    <noframes>    <bgsound>     <noembed>    <plaintext>
     
    Tables
    
        <table>    <caption>    <colgroup>    <col>
        <tbody>    <thead>      <tfoot>
        <tr>       <td>         <th>
    
    Forms
    
        <form>       <fieldset>    <legend>      <label>
        <input>      <button>      <select>      <datalist>
        <optgroup>   <option>      <textarea>    <keygen>
        <output>     <progress>    <meter>
    
    Interactive
    
        <details>    <summary>    <command>    <menu>
    Previous HTML Elements
    
        <acronym>
        <applet>     (deprecated in HTML 4.01, non conformant in HTML5)
        <basefont>   (deprecated in HTML 4.01, non conformant in HTML5)
        <bgsound>
        <big>
        <blink>
        <c>          (never deployed, was a proposal before span)
        <center>     (deprecated in HTML 4.01, non conformant in HTML5)
        <font>       (deprecated in HTML 4.01, non conformant in HTML5)
        <frame>
        <frameset>
        <isindex>    (deprecated in HTML 4.01, non conformant in HTML5)
        <listing>
        <marquee>
        <nextid>
        <nobr>    <noembed>    <noframes>    <plaintext>
        <spacer>
        <strike>     (deprecated in HTML 4.01, non conformant in HTML5)
        <tt>
        <u>          (deprecated in HTML 4.01, non conformant in HTML5)
        <xmp>

    see also in:
    https://en.wikipedia.org/wiki...
    https://www.w3.org/TR/html/
    https://www.w3.org/TR/html51/web

相關文章
相關標籤/搜索