<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # HTML &lt;style&gt; 標簽 ## 實例 ``` <html> <head> <style type="text/css"> h1 {color:red} p {color:blue} </style> </head> <body> <h1>Header 1</h1> <p>A paragraph.</p> </body> </html> ``` ## 瀏覽器支持 | IE | Firefox | Chrome | Safari | Opera | | --- | --- | --- | --- | --- | 所有主流瀏覽器都支持 &lt;style&gt; 標簽。 ## 定義和用法 &lt;style&gt; 標簽用于為 HTML 文檔定義樣式信息。 在 style 中,您可以規定在瀏覽器中如何呈現 HTML 文檔。 type 屬性是必需的,定義 style 元素的內容。唯一可能的值是 "text/css"。 style 元素位于 head 部分中。 ## 提示和注釋 提示:如需鏈接外部樣式表,請使用 [&lt;link&gt; 標簽](/tags/tag_link.asp "HTML &lt;link&gt; 標簽")。 提示:如需學習更多有關樣式表的知識,請閱讀我們的 [CSS 教程](/css/index.asp "CSS 教程")。 ## HTML 與 XHTML 之間的差異 NONE ## 必需的屬性 | 屬性 | 值 | 描述 | | --- | --- | --- | | [type](/tags/att_style_type.asp "HTML &lt;style&gt; 標簽的 type 屬性") | text/css | 規定樣式表的 MIME 類型。 | ## 可選的屬性 | 屬性 | 值 | 描述 | | --- | --- | --- | | [media](/tags/att_style_media.asp "HTML &lt;style&gt; 標簽的 media 屬性") | `screen` `tty` `tv` `projection` `handheld` `print` `braille` `aural` `all` | 為樣式表規定不同的媒介類型。 | ## 全局屬性 &lt;style&gt; 標簽支持 [HTML 中的全局屬性](/tags/html_ref_standardattributes.asp)。 ## 事件屬性 &lt;style&gt; 標簽支持 [HTML 中的事件屬性](/tags/html_ref_eventattributes.asp)。 ## TIY 實例 [HTML中的樣式](/tiy/t.asp?f=html_style) 本例演示如何使用添加到 &lt;head&gt; 部分的樣式信息對 HTML 進行格式化。 ``` <html> <head> <style type="text/css"> h1 {color: red} p {color: blue} </style> </head> <body> <h1>header 1</h1> <p>A paragraph.</p> </body> </html> ``` [沒有下劃線的鏈接](/tiy/t.asp?f=html_linknoline) 本例演示如何使用樣式屬性做一個沒有下劃線的鏈接。 ``` <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="zh-cn" /> </head> <body> <a href="/example/html/lastpage.html" style="text-decoration:none"> 這是一個鏈接! </a> </body> </html> ``` [鏈接到一個外部樣式表](/tiy/t.asp?f=html_link) 本例演示如何&lt;link&gt;標簽鏈接到一個外部樣式表。 ``` <html> <head> <link rel="stylesheet" type="text/css" href="/html/csstest1.css" > </head> <body> <h1>我通過外部樣式表進行格式化。</h1> <p>我也一樣!</p> </body> </html> ``` ## 相關頁面 HTML DOM 參考手冊:[Style 對象](/jsref/dom_obj_style.asp "HTML DOM Style 對象")
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看