目錄
地址標籤中的重要要點
等內容。或其他元素。
標籤特定屬性
1.全域屬性
2.事件屬性
CSS text formatting properties in <address> tag
CSS Font properties in <address> tag
CSS Test Shadow property for <address> tag
Examples of Address Tag in HTML
Example #3
Conclusion
首頁 web前端 html教學 HTML 中的位址標籤

HTML 中的位址標籤

Sep 04, 2024 pm 04:30 PM
html html5 HTML Tutorial HTML Properties HTML tags

HTML 文件的地址標籤是符號化的,提供有關組織或個人的聯絡資訊。 標籤在HTML 文件中的不同位置使用時具有不同的含義;當它在

中使用時標籤,那麼它將顯示文檔的聯繫信息,如果在
中使用它,那麼它將顯示文件的聯絡資訊。 tag,那麼它就代表了文章的聯繫方式。一般來說,由
表示的文字是:標籤將以斜體顯示。某些瀏覽器具有在地址標記前後添加換行符的功能。 標籤可以在多種上下文中使用,例如透過包含來指示文章的作者。
中的元素在頁首中標記或提供企業的聯絡資訊。

注意: HTML5 中的 Address 標籤需要開始和結束標籤,即

……..
  • 地址標籤不能代表任意地址(即與聯絡資訊無關的地址)。
  • 地址標籤不應包含聯絡資訊以外的信息,例如發布日期(為此,請使用

文法

以下是提到的語法:

1。 HTML/XHTML

<body>
<footer> ... </footer>
<body>
登入後複製

2。 CSS

footer{
--your css code—
}
登入後複製

地址標籤中的重要要點

下面提到了有關標籤的一些要點:

  • 如果有的話,元素正式放置在
    內。當前部分的元素。
  • 之前,
    曾經是這樣的情況。元素只能代表文檔作者的聯絡資訊。然而,它的定義在最新的規範版本中已經升級,因為它現在可以用於任意標記位址。
  • ;元素不應包含比聯絡資訊更多的信息,例如發布日期(為此,請使用
  • 位址標籤唯一允許的內容類型是流內容,意思是作為父標籤,不能巢狀
    標籤。元素;然後相同的內容不能有 標籤作為其父級。
  • 大多數瀏覽器都會呈現
    內的文字斜體標籤,但您可以透過 CSS 樣式變更此行為。
  • 地址標籤不能代表任意地址(例如郵寄地址),除非這些地址是該部分的聯絡資訊。若要顯示郵寄地址,請使用

    標籤。

  • ;標籤不允許包含
  • 對於早於IE 9 的Internet Explorer 瀏覽器,請使用HTML5,這是一種JavaScript 解決方法,可為新的HTML5 元素(例如
    、 、、

標籤特定屬性

不能使用特定屬性標籤。

1.全域屬性

像所有其他 HTML 標籤一樣,

標籤也支援HTML5中的全域屬性。以下是全域屬性:
  • 訪問鍵
  • 班級
  • 內容可編輯
  • 上下文選單
  • 目錄
  • 可拖曳
  • 降落區
  • 隱藏
  • id
  • 項目
  • itemprop
  • 項目參考
  • 專案範圍
  • 項目類型
  • 拼字檢查
  • 風格
  • 標籤索引
  • 標題
  • 翻譯

有關這些屬性的完整說明,請造訪 https://www.educba.com/html-attributes/。

2.事件屬性

; HTML5 中的 tag 也支援所有事件屬性。以下是以下事件處理程序內容屬性。

  • onabort
  • oncancel
  • onblur
  • oncanplay
  • oncanplaythrough
  • onchange
  • onclick
  • oncontextmenu
  • ondblclick
  • ondrag
  • ondragend
  • ondragenter
  • ondragexit
  • ondragleave
  • ondragover
  • ondragstart
  • ondrop
  • ondurationchange
  • onemptied
  • onended
  • onerror
  • onfocus
  • onformchange
  • onforminput
  • oninput
  • oninvalid
  • onkeydown
  • onkeypress
  • onkeyup
  • onload
  • onloadeddata
  • onloadedmetadata
  • onloadstart
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • onmousewheel
  • onpause
  • onplay
  • onplaying
  • onprogress
  • onratechange
  • onreadystatechange
  • onscroll
  • onseeked
  • onseeking
  • onselect
  • onshow
  • onstalled
  • onsubmit
  • onsuspend
  • ontimeupdate
  • onvolumechange
  • onwaiting

For a full explanation of these attributes, visit  https://www.educba.com/html-event-attributes/

CSS text formatting properties in
tag

  • Text-color
  • Text-alignment
  • Text-decoration
  • Text-transformation
  • Line-height
  • Text-direction
  • Text-shadow
  • Word-spacing

CSS Font properties in
tag

  • font-style – normal|italic|oblique|initial|inherit
  • font-variant – normal|small-caps|initial|inherit
  • font-weight – normal|bold|bolder|lighter|number|initial|inherit
  • font-size – medium|xx-small|x-small|small|large|x-large|xx-large|smaller|larger|length|initial|inherit
  • font-family – family-name|generic-family|initial|inherit

CSS Test Shadow property for
tag

<style>
address{
text-shadow: 1px 1px #FF0000;
}
</style>
登入後複製

Note: If the footer contains contact details, put them in the

tag.

Examples of Address Tag in HTML

Below are the examples of Address Tag in HTML:

Example #1

Code:

<!DOCTYPE html>
<html>
<head> . . . </head>
<body>
<header>
<h1>HTML Address tag example</h1>
</header>
<main>
<article> An article on HTML Address tag</article>
</main>
<aside> Body of an article </aside>
<footer>
<section>Copyright &copy;2020- EDUCBA.</section>
<address> A- 406, Boomerang, Chandivali Farm Road,
Yadav Nagar, Chandivali, Powai,
Maharashtra, Mumbai - 400072. </address>
</footer>
</body>
</html>
登入後複製

Output:

HTML 中的位址標籤

Example #2

Code:

<!DOCTYPE html>
<html>
<head> . . . </head>
<body>
<header>
<h1>HTML Address tag example</h1>
</header>
<div>
<address> A- 406, Boomerang, Chandivali Farm Road,
Yadav Nagar, Chandivali, Powai,
Maharashtra, Mumbai - 400072. </address>
</div>
</body>
</html>
登入後複製

Output:

HTML 中的位址標籤

Example #3

Code:

<!DOCTYPE html>
<html>
<head> . . . </head>
<body>
<header>
<h1>HTML Address tag example</h1>
</header>
<div>
<address> We are always here to help. If you have a requirement / query about our services; email us at <a href="[email&#160;protected]">[email protected]</a> and we'll do our best to reply within 24 hours </address>
</div>
</body>
</html>
登入後複製

Output:

HTML 中的位址標籤

Conclusion

Below are mentioned some of the main key points which you should remember from this topic:

  • The HTML
    element is always in the tag.
  • The HTML
    tag provides the contact information for the closest ancestor in HTML 4.01.
  • The HTML
    tag includes contact information for the closest
    or ancestor in HTML5.
  • The
    tag is usually placed inside the
    tag for the
    or .
  • Do not place the publication date inside the
    tag; use the
  • Most browsers will render the text within the
    tag in Italics, but you can change this behavior by CSS styling.

以上是HTML 中的位址標籤的詳細內容。更多資訊請關注PHP中文網其他相關文章!

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1663
14
CakePHP 教程
1420
52
Laravel 教程
1313
25
PHP教程
1266
29
C# 教程
1238
24
HTML 中的表格邊框 HTML 中的表格邊框 Sep 04, 2024 pm 04:49 PM

HTML 表格邊框指南。在這裡,我們以 HTML 中的表格邊框為例,討論定義表格邊框的多種方法。

HTML 中的巢狀表 HTML 中的巢狀表 Sep 04, 2024 pm 04:49 PM

這是 HTML 中巢狀表的指南。這裡我們討論如何在表中建立表格以及對應的範例。

HTML 左邊距 HTML 左邊距 Sep 04, 2024 pm 04:48 PM

HTML 左邊距指南。在這裡,我們討論 HTML margin-left 的簡要概述及其範例及其程式碼實作。

HTML 表格佈局 HTML 表格佈局 Sep 04, 2024 pm 04:54 PM

HTML 表格佈局指南。在這裡,我們詳細討論 HTML 表格佈局的值以及範例和輸出。

HTML 輸入佔位符 HTML 輸入佔位符 Sep 04, 2024 pm 04:54 PM

HTML 輸入佔位符指南。在這裡,我們討論 HTML 輸入佔位符的範例以及程式碼和輸出。

您如何在PHP中解析和處理HTML/XML? 您如何在PHP中解析和處理HTML/XML? Feb 07, 2025 am 11:57 AM

本教程演示瞭如何使用PHP有效地處理XML文檔。 XML(可擴展的標記語言)是一種用於人類可讀性和機器解析的多功能文本標記語言。它通常用於數據存儲

HTML 有序列表 HTML 有序列表 Sep 04, 2024 pm 04:43 PM

HTML 有序列表指南。在這裡我們也分別討論了 HTML 有序列表和類型的介紹以及它們的範例

HTML onclick 按鈕 HTML onclick 按鈕 Sep 04, 2024 pm 04:49 PM

HTML onclick 按鈕指南。這裡我們分別討論它們的介紹、工作原理、範例以及各個事件中的onclick事件。

See all articles