搜尋
首頁web前端html教學HTML 中的位址標籤

HTML 中的位址標籤

Sep 04, 2024 pm 04:30 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

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

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

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

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

文法

以下是提到的語法:

1。 HTML/XHTML

<footer> ... </footer>

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:


 . . . 

<header>
<h1 id="HTML-Address-tag-example">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 ©2020- EDUCBA.</section>
<address> A- 406, Boomerang, Chandivali Farm Road,
Yadav Nagar, Chandivali, Powai,
Maharashtra, Mumbai - 400072. </address>
</footer>

Output:

HTML 中的位址標籤

Example #2

Code:


 . . . 

<header>
<h1 id="HTML-Address-tag-example">HTML Address tag example</h1>
</header>
<div>
<address> A- 406, Boomerang, Chandivali Farm Road,
Yadav Nagar, Chandivali, Powai,
Maharashtra, Mumbai - 400072. </address>
</div>

Output:

HTML 中的位址標籤

Example #3

Code:


 . . . 

<header>
<h1 id="HTML-Address-tag-example">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="%5Bemail%C2%A0protected%5D">[email protected]</a> and we'll do our best to reply within 24 hours </address>
</div>

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
HTML行動:網站結構的示例HTML行動:網站結構的示例May 05, 2025 am 12:03 AM

HTML用於構建結構清晰的網站。 1)使用標籤如、、定義網站結構。 2)示例展示了博客和電商網站的結構。 3)避免常見錯誤如標籤嵌套不正確。 4)優化性能通過減少HTTP請求和使用語義化標籤。

您如何將圖像插入HTML頁面?您如何將圖像插入HTML頁面?May 04, 2025 am 12:02 AM

toinsertanimageIntoanhtmlpage,usethetagwithsrcandaltattributes.1)usealttextforAcccessibilityandseo.2)instementRcsetForresponSiveImages.3)applylazyloadingWithLoadingWithLoading =“ lazy” tooptimizeperformance.4)tooptimizeperformance.4)

HTML的目的:啟用Web瀏覽器可以顯示內容HTML的目的:啟用Web瀏覽器可以顯示內容May 03, 2025 am 12:03 AM

HTML的核心目的在於讓瀏覽器理解並展示網頁內容。 1.HTML通過標籤定義網頁結構和內容,如、到、等。 2.HTML5增強了多媒體支持,引入了和標籤。 3.HTML提供了表單元素,支持用戶交互。 4.優化HTML代碼可提升網頁性能,如減少HTTP請求和壓縮HTML。

為什麼HTML標籤對Web開發很重要?為什麼HTML標籤對Web開發很重要?May 02, 2025 am 12:03 AM

htmltagsareessentialforwebdevelopmentastheyandendenhancewebpages.1)semantictagsimproveaccessibilityandseo.2)semanteLayOut,語義和互動性。 3)poseriblesibilityandseoandseo.3)poseriblesoftagscanoftagscanoftagscanoptagscanoptimizeperefeneandimizeanDenSuroceRecRoscRoss-BrowserCrowserCercerComercompatibility。

說明將一致的編碼樣式用於HTML標籤和屬性的重要性。說明將一致的編碼樣式用於HTML標籤和屬性的重要性。May 01, 2025 am 12:01 AM

一致的HTML編碼風格很重要,因為它提高了代碼的可讀性、可維護性和效率。 1)使用小寫標籤和屬性,2)保持一致的縮進,3)選擇並堅持使用單引號或雙引號,4)避免在項目中混合使用不同風格,5)利用自動化工具如Prettier或ESLint來確保風格的一致性。

如何在 Bootstrap 4 中實現多項目輪播?如何在 Bootstrap 4 中實現多項目輪播?Apr 30, 2025 pm 03:24 PM

在Bootstrap4中實現多項目輪播的解決方案在Bootstrap4中實現多項目輪播並不是一件簡單的事情。雖然Bootstrap...

deepseek官網是如何實現鼠標滾動事件穿透效果的?deepseek官網是如何實現鼠標滾動事件穿透效果的?Apr 30, 2025 pm 03:21 PM

如何實現鼠標滾動事件穿透效果?在我們瀏覽網頁時,經常會遇到一些特別的交互設計。比如在deepseek官網上,�...

HTML 視頻的播放控件樣式怎麼修改HTML 視頻的播放控件樣式怎麼修改Apr 30, 2025 pm 03:18 PM

無法直接通過CSS修改HTML視頻的默認播放控件樣式。 1.使用JavaScript創建自定義控件。 2.通過CSS美化這些控件。 3.考慮兼容性、用戶體驗和性能,使用庫如Video.js或Plyr可簡化過程。

See all articles

熱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

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

熱工具

SublimeText3 英文版

SublimeText3 英文版

推薦:為Win版本,支援程式碼提示!

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

VSCode Windows 64位元 下載

VSCode Windows 64位元 下載

微軟推出的免費、功能強大的一款IDE編輯器

MantisBT

MantisBT

Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。