islujw
V2EX  ›  CSS

是否可以在说明文档中这样闭合标签……

  •  
  •   islujw · Aug 3, 2017 · 3278 views
    This topic created in 3399 days ago, the information mentioned may be changed or developed.

    写说明文档,需要表述如何将 CSS 在 HTML 中声明,是否可以这样写:

    在 HTML 的 <head /> 标签内引入 CSS 样式表。
    

    还是说,必须这样写:

    在 HTML 的 <head></head> 标签内引入 CSS 样式表。
    

    或者这样:

    在 HTML 的 <head> 标签内引入 CSS 样式表。
    

    ————————————————————

    另外,还有内容是:

    请尽可能仅使用 <div /> <p /> <a /> <img /> 元素。
    

    是不是要写成:

    请尽可能仅使用 <div> <p> <a> <img> 元素。
    
    2 replies  •  2017-08-03 20:46:55 +08:00
    oott123
    oott123
    Aug 3, 2017 via Android
    1
    我觉得 <head> 或者 head 就好。
    不过这是习惯问题,选你喜欢的来…
    geelaw
    geelaw
    Aug 3, 2017
    2
    `head` 标签、`head` 元素,`<head>` 叫做 opening tag (开启标签)。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2580 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:54 · PVG 18:54 · LAX 02:54 · JFK 05:54
    ♥ Do have faith in what you're doing.