我們如何使用HTML中的`
`標籤進行電腦輸出格式化?

王林
發布: 2023-08-29 16:17:03
轉載
951 人瀏覽過

我們如何使用HTML中的`<pre class=`標籤進行電腦輸出格式化?"></p> <p>我們使用<b><samp></samp></b>標籤來進行電腦輸出格式。它是一個短語標籤。它用於定義和標識電腦程式的樣本輸出。它將在單一字體中顯示<samp>元素內的文字。 </samp></p> <h2>文法</h2> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><samp>The text…</samp>

登入後複製

Example 1

的中文翻譯為:

範例 1

以下是一個簡單的範例,用於解釋在HTML中使用標籤的用法 -

<html>
<head>
   <meta charset="UTF-8">
   <meta name="description" content="meta tag in the web document">
   <meta name="keywords" content="HTML,CSS">
   <meta name="author" content="lokesh">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
   <p><b>Pluralsight</b> is the technology workforce development company that helps teams know more and work better together with stronger skills, improved processes</p>
   <samp>
      Pluralsight, Inc. is an American privately held online education company that offers a variety of video training courses for software developers
   </samp>
</body>
</html>
登入後複製

Example 2

的中文翻譯為:

範例2

在HTML文件中使用這個標籤的另一個例子是−

<html>
<head>
   <title>Title of the document</title>
</head>
<body>
   <samp>
      <h2> HTML document</h2>
      <p>This is a paragraph.</p>
      <p>This is another paragraph</p>
   </samp>
</body>
</html>
登入後複製

Example 3

的翻譯為:

範例3

我們可以使用樣式表覆蓋字體樣式。

<html>
<head>
   <meta charset="UTF-8">
   <meta name="description" content="meta tag in the web document">
   <meta name="keywords" content="HTML,CSS">
   <meta name="author" content="lokesh">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <style>
      samp{
         font-family: cursive;
      }
   </style>
</head>
<body>
   <p><b>Pluralsight</b> is the technology workforce development company that helps teams know more and work better together with stronger skills, improved processes</p>
   <samp>
      Pluralsight, Inc. is an American privately held online education company that offers a variety of video training courses for software developers
   </samp>
</body>
</html>
登入後複製

以上是我們如何使用HTML中的`

`標籤進行電腦輸出格式化?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:tutorialspoint.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門推薦
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!