ホームページ  >  記事  >  ウェブフロントエンド  >  HTMLのアドレスタグ

HTMLのアドレスタグ

WBOY
WBOYオリジナル
2024-09-04 16:30:55837ブラウズ

HTML ドキュメントのアドレス タグはシンボル表示され、組織または個人に関する連絡先情報を提供します。 タグは、HTML ドキュメント内の異なる場所で使用されると異なる意味を持ちます。 内で使用される場合タグを使用すると、ドキュメントの連絡先情報が表示されます。

内で使用されている場合は、その連絡先情報が表示されます。タグの場合、記事の連絡先情報を表します。一般に、

で表されるテキストは、タグは斜体で表示されます。一部のブラウザには、アドレスタグの前後に改行を追加する機能があります。 タグは、 を含めることで記事の著者を示すなど、さまざまなコンテキストで使用できます。
内の要素タグを付けるか、ページヘッダーに企業の連絡先情報を入力します。

注: HTML5 の Address タグには、開始タグと終了タグの両方が必要です。つまり、

……..

  • アドレス タグは、任意のアドレス (つまり、連絡先情報に関係のないアドレス) を表すことはできません。
  • アドレス タグには、出版日などの連絡先情報以外の情報を含めないでください (その場合は、代わりに

構文

以下に記載の構文を示します:

1. HTML/XHTML

<body>
<footer> ... </footer>
<body>

2. CSS

footer{
--your css code—
}

アドレスタグの注意点

タグに関する重要な点を以下に示します:

  • 存在する場合、<アドレス>要素は正式に
    内に配置されます。現在のセクションの要素。
  • 以前は、
    は、要素は、ドキュメントの作成者の連絡先情報のみを表すことができます。ただし、最新の仕様バージョンではその定義がアップグレードされ、任意のマークアップ アドレスに使用できるようになりました。
  • 要素には、出版日などの連絡先情報以外の情報を含めないでください (その場合は、代わりに
  • Address タグに許可される唯一のコンテンツ タイプは、
    を意味するフロー コンテンツです。タグは、親としてネストされた
    を持つことはできません。要素;その後、同じ コンテンツに
    を含めることはできません。
  • を親としてタグ付けします。
  • ほとんどのブラウザは、
    内のテキストをレンダリングします。タグは斜体で表示されますが、CSS スタイルによってこの動作を変更できます。
  • アドレス タグは、そのアドレスがセクションの連絡先情報でない限り、任意のアドレス (郵便番号など) を表すことはできません。郵便番号を表示するには、

    ボタンを使用します。タグ。

  • タグには、
  • IE 9 より古い Internet Explorer ブラウザの場合は、HTML5 を使用します。これは、
    、などの新しい HTML5 要素のサポートを提供する JavaScript の回避策です。

タグ固有の属性

では特定の属性を使用できません。タグ。

1.グローバル属性

他のすべての HTML タグと同様、

タグは、HTML5 のグローバル属性もサポートします。以下はグローバル属性です:

  • アクセスキー
  • クラス
  • コンテンツ編集可能
  • コンテキストメニュー
  • ディレクトリ
  • ドラッグ可能
  • ドロップゾーン
  • 非表示
  • ID
  • アイテムID
  • アイテムプロップ
  • アイテム参照
  • アイテムスコープ
  • アイテムタイプ
  • ラング
  • スペルチェック
  • スタイル
  • タブインデックス
  • タイトル
  • 翻訳

これらの属性の詳しい説明については、https://www.educba.com/html-attributes/ をご覧ください。

2.イベント属性

HTML5 の タグもすべてのイベント属性をサポートします。以下のイベント ハンドラー コンテンツ属性を示します。

  • 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 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。