目次
属性
1.グローバル属性
2.イベント属性
3. Windows イベント属性
4.フォームイベント属性
Examples of implementing HTML address Tag
Example #1
Example #2 – Color property
Example #3 – Background Color Property
Example #4 – Text Decoration
Example #5 – CSS Fonts
Example #6 – Text Shadow
Example #7 – Line Height
Conclusion

HTMLアドレスタグ

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

タグは、サイト所有者または記事著者に関する連絡先の詳細を取得するために使用されます。これには、住所、電話番号、電子メール、Web サイト接続などが含まれる場合があります。 タグは、ページ ヘッダーのビジネス連絡先情報や作成者に関連する連絡先情報など、さまざまなコンテキストに役立ちます。伝統的に、ブラウザーは

タグに含まれる斜体のテキストを作成します。タグ。このタグは通常、< の要素とも呼ばれます。住所>。通常、<住所>要素は < に含まれます。フッター>要素とその他の詳細。それ以外の方法でアドレスを特定するために使用すべきではありませんか?このトピックでは、HTML アドレス タグについて学習します。

構文

の構文タグは以下のように記述されます:

<html>
<body>
<address>
Contact Information:<br>
www.mycompany.com<br>
#12345, Main Street<br>
Name of City, Name of State
</address>
</body>
</html>
ログイン後にコピー

属性

以下に挙げる属性は次のとおりです

1.グローバル属性

グローバル属性は、HTML 要素で使用される属性に関連するために使用されます。このような属性は、すべての HTML 要素にわたって普及しています。

  • accesskey: 要素をアクティブにするためのショートカット キーを定義します。
  • class: 要素のクラス名を与えます。
  • contenteditable: 要素が編集可能かどうかを示すために使用されます。
  • dir: 要素のテキスト方向を定義するために使用されます。
  • draggable: ページ上で要素をドラッグする方法を定義します。
  • dropzone: 接続時にデータのコピー、移動、リンクが可能かどうかを示すために使用されます。
  • id: 要素の特定の ID を定義します。
  • lang: 要素のコンテンツの言語を定義します。
  • style: 要素の CSS スタイルを提供します。
  • tabindex: 要素のタブ順序を定義するために使用されます。
  • title: 要素の追加情報を提供するために使用されます。
  • translate: 要素の内容が翻訳可能かどうかを示します。
  • spellcheck: 要素のコンテンツのスペル チェックを定義します。
  • data: HTML と DOM 記述の間でプライベート データを交換するために使用されます。
  • hidden: この属性は、要素を非表示にする必要がある場合に使用されます

2.イベント属性

ブラウザが特定のユーザーの介入に応答するたびにイベントが発生します。ユーザーがマウスをクリックしたとき、ドキュメントや画像をアップロードしたとき、ビデオを再生したとき、または Web ページ上でその他のアクティビティを実行したとき。

3. Windows イベント属性

ウィンドウ イベント属性は、ウィンドウ オブジェクトが開始されるときに使用されます。

  • onafterprint: ドキュメントを印刷する必要がある場合に使用されます。
  • onbeforeprint: ドキュメントを印刷する必要がある前に実行されます。
  • onbeforeload: ドキュメントがアンロードされるときに使用されます。
  • onblur: この属性は、ウィンドウにフォーカスがないときに定義されます。
  • onerror: ドキュメントのダウンロード中にエラーが発生した場合に定義されます。
  • onload: Web ページのコンテンツが読み込まれるときに指定されます。
  • onmessage: メッセージに原因がある場合に使用されます。
  • onoffline: この属性は、ブラウザがオフライン モードで動作するときに使用されます。
  • ononline: この属性は、ブラウザがオンライン モードで動作するときに使用されます。
  • onpagehide: ユーザーが Web ページから離れるときに指定されます。
  • onpageshow: ユーザーが Web ページに移動するときに指定されます。
  • onpopstate: この属性は、ウィンドウ履歴に変更があった場合に使用されます。
  • onredo: ページにやり直しオプションがある場合に使用されます。
  • onresize: ユーザーがウィンドウのサイズを変更するときに指定されます。
  • onstorage: Web ストレージに更新があるときに定義されます。
  • onundo: 取り消された元に戻すオプションがある場合に使用されます。
  • onunload: Web ページのコンテンツがアンロードされるときに指定されます。

4.フォームイベント属性

フォーム内で発生する可能性のあるイベントは、プロセス内のイベントとみなされます。フォーム イベントは、ユーザーがフォームを開いたり閉じたり、フォーム間を切り替えたり、データを含むフォームを操作したりしたときに発生します。

  • onblur: This attribute will be defined when there is no focus on the form element.
  • onchange: It is defined when there is a change in the value of an element.
  • oncontextmenu: It is used when the user wants to see the context menu.
  • onfocus: It is used when an element gets a focus.
  • oninput: It is used when an element gets input from the user.
  • oninvalid: It is specified when there is an invalid element on a page.
  • onreset: This attribute will be used when a user wants to reset the form.
  • onsearch: It is defined when the user searches for some information in the search field.
  • onselect: It is used when the user selects the text in an element.
  • onsubmit: It is used when the user submits the form.

Examples of implementing HTML address Tag

Here are the following examples mention below

Example #1

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
Contact Address:<br>
mycompany.com<br>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

  • Save the above code in a file with a .html extension
  • Run the html file in a browser, and you would get the output as shown in the below image

HTMLアドレスタグ

Example #2 – Color property

Code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.color_prop {
color: #1c87c9;
}
</style>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
<p class="color_prop">Contact Address:</p>
mycompany.com<br>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

Run the above file in a browser, and you would get the output as shown in the below image:

HTMLアドレスタグ

Example #3 – Background Color Property

Code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.color_prop {
background-color: #1c87c9;
}
</style>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
<div class="color_prop">Contact Address:<br>
mycompany.com<br>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</div>
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

Run the above file in a browser, and you would get the output as shown in the below image:

HTMLアドレスタグ

Example #4 – Text Decoration

Code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.style1 {
text-decoration: underline;
}
.style2 {
text-decoration: italic;
}
</style>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
<p class="style1">Contact Address:</p>
<p class="style2">mycompany.com</p>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</div>
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

Run the above file in a browser, and you would get the output as shown in the below image:

HTMLアドレスタグ

Example #5 – CSS Fonts

Code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.style1 {
font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
.style2 {
font-weight: bolder;
}
</style>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
<p class="style1">Contact Address:</p>
<p class="style2">mycompany.com</p>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</div>
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

Run the above file in a browser, and you would get the output as shown in the below image:

HTMLアドレスタグ

Example #6 – Text Shadow

Code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.style1 {
text-shadow: 2px 2px #1c87c9;
}
</style>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
<p class="style1">Contact Address:</p>
mycompany.com<br>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</div>
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

Run the above file in a browser, and you would get the output as shown in the below image:

HTMLアドレスタグ

Example #7 – Line Height

Code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.color_prop {
line-height: 2.0;
}
</style>
</head>
<body>
<article>
<h2>This is Heading Title</h2>
<p>Information about article will be written here...</p>
</article>
<footer>
<address>
<div class="color_prop">Contact Address:<br>
mycompany.com<br>
#987 5th Main, 10th Cross<br>
XYZ road<br>
New Delhi, India
</div>
</address>
</footer>
</body>
</html>
ログイン後にコピー

Output:

Run the above file in a browser, and you would get the output as shown in the below image:

HTMLアドレスタグ

Conclusion

So far, we have studied how to address tag will be used when an owner wants to specify the address information. In order to quickly contact the author via email, this feature is often combined with the HTML mailto property. The address tag will usually be included in the section < footer> section.

以上がHTMLアドレスタグの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

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

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

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 入力プレースホルダーの例について説明します。

HTML 順序付きリスト HTML 順序付きリスト Sep 04, 2024 pm 04:43 PM

HTML 順序付きリストのガイド。ここでは、HTML 順序付きリストと型の導入とその例についても説明します。

HTML の onclick ボタン HTML の onclick ボタン Sep 04, 2024 pm 04:49 PM

HTML オンクリック ボタンのガイド。ここでは、それらの紹介、動作、例、およびさまざまなイベントでの onclick イベントについてそれぞれ説明します。

HTML 内のテキストの移動 HTML 内のテキストの移動 Sep 04, 2024 pm 04:45 PM

HTML でのテキストの移動に関するガイド。ここでは、概要、マーキー タグが構文でどのように機能するか、および実装例について説明します。

See all articles