【问题标题】:what do "code listings" mean in html ref definition of <figure>?<figure> 的 html ref 定义中的“代码列表”是什么意思?
【发布时间】:2021-01-10 05:33:19
【问题描述】:

我正在查看 html 参考页面,他们在其中放置了有关 HTML 标记的所有描述。它说“标签指定了独立的内容,如插图、图表、照片、代码列表等。”我不明白什么是代码清单。它实际上是指该定义中的代码列表吗?

【问题讨论】:

    标签: html figure


    【解决方案1】:

    表示在页面上列出类似的代码

    <figure>
      <figcaption>Get browser details using <code>navigator</code>.</figcaption>
      <pre>
    function NavigatorExample() {
      var txt;
      txt = "Browser CodeName: " + navigator.appCodeName + "; ";
      txt+= "Browser Name: " + navigator.appName + "; ";
      txt+= "Browser Version: " + navigator.appVersion  + "; ";
      txt+= "Cookies Enabled: " + navigator.cookieEnabled  + "; ";
      txt+= "Platform: " + navigator.platform  + "; ";
      txt+= "User-agent header: " + navigator.userAgent  + "; ";
      console.log("NavigatorExample", txt);
    }
      </pre>
    </figure>
    

    【讨论】:

      猜你喜欢
      • 2020-09-25
      • 1970-01-01
      • 1970-01-01
      • 2013-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多