HTML 圖例標籤

WBOY
發布: 2024-09-04 16:21:50
原創
530 人瀏覽過

圖例標籤用於定義的標題或標題。標籤,並且它被認為是該元素的第一個子元素。作為標題,它通常放置在框架的頂部。 的目的是在特定元素的內容上建立一個包圍框。主要目的是藉助欄位集包裝表單、圖像、內容,也用於描述資訊的上下文。在下面的部分中,我們將討論有關的資訊。標籤以及深入的範例。本文的主要座右銘是展示如何簡單且創意地使用 HTML 元素標籤進行示範。

文法

<legend>
……
</legend>
登入後複製

HTML

;元素被放置在 內元素,其周圍標記為黑色邊框;如果你想要一個時尚的或改變框架的行為,那麼這裡使用CSS。這個標籤與
完全不同。標籤。此標籤支援所有瀏覽器,如 Chrome、android、firefox、Opera、Internet Explorer。所有這些元素在所有瀏覽器中都是統一的。

代碼:

<fieldset>
<legend>
Text
</legend>
… Content
<fieldset>
登入後複製

必須提供開始和結束標籤。

屬性

一般來說,HTML 標籤具有一個或多個屬性,這些屬性提供了 HTML 元素的重要面向。圖例標籤支援所有已定義的全域屬性。某些屬性不支援現代網頁瀏覽器。下表給出了標籤屬性及其描述。

1.標籤特定屬性

align:定義表單中給定的標題或說明相對於父級

的對齊方式。

代碼:

<fieldset>
<legend align="center">Align
demo:</legend>
登入後複製

注意:為了清晰對齊,最好對元素的變體使用 CSS-Align。

2.標準屬性

這些屬性的描述已經在上一篇文章中討論過。

  • 存取金鑰
  • 班級
  • 目錄
  • id
  • 風格
  • id
  • 標籤索引
  • 標題

3.全域屬性

圖例標籤也接受先前討論的全域屬性,這是所有 HTML5 元素的標準。下面列出了一些:

Context

Define the Context

Dir

 The values give the path of the text.

Id

 Its identifier must match the value of a name.

Style

 Specifies the inline and external styles.

Lang

Determines the language used in the text.

上下文

onabort It is called when a particular event has been aborted. For example, the web browser immediately video before it is completely downloaded.
onblur Defines the focus of the element.
oncancel Stops the processed event handler.
Onclick Triggers when a click is done
onchange When a click is done somewhere.
onfocus Triggered when the focus is on the given element
定義上下文

目錄

這些值給了文字的路徑。

Id

其識別碼必須與名稱值相符。

樣式

 指定內聯樣式和外部樣式。

確定文本中使用的語言。

表> 4.事件屬性

5. Other Attributes Are

onmouse down, onmouse up, onmouse over, onmouse move, onmouse out, on focus, on blur, onkey press,onkey down,onkey up. The tags that come with the tag are listed below: