検索

HTMLアドレスタグ

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

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

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

構文

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

<address>
Contact Information:<br>
www.mycompany.com<br>
#12345, Main Street<br>
Name of City, Name of State
</address>

属性

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

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



<meta charset="UTF-8">
<title>
HTML Address Tag
</title>


<article>
<h2 id="This-is-Heading-Title">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>

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:



<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.color_prop {
color: #1c87c9;
}
</style>


<article>
<h2 id="This-is-Heading-Title">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>

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:



<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.color_prop {
background-color: #1c87c9;
}
</style>


<article>
<h2 id="This-is-Heading-Title">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>

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:



<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.style1 {
text-decoration: underline;
}
.style2 {
text-decoration: italic;
}
</style>


<article>
<h2 id="This-is-Heading-Title">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

</address>
</footer>

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:



<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>


<article>
<h2 id="This-is-Heading-Title">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

</address>
</footer>

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:



<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.style1 {
text-shadow: 2px 2px #1c87c9;
}
</style>


<article>
<h2 id="This-is-Heading-Title">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

</address>
</footer>

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:



<meta charset="UTF-8">
<title>
HTML Address Tag
</title>
<style>
.color_prop {
line-height: 2.0;
}
</style>


<article>
<h2 id="This-is-Heading-Title">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>

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 section.

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

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

Web開発におけるHTML、CSS、およびJavaScriptの役割は次のとおりです。1。HTMLは、Webページ構造を定義し、2。CSSはWebページスタイルを制御し、3。JavaScriptは動的な動作を追加します。一緒に、彼らは最新のウェブサイトのフレームワーク、美学、および相互作用を構築します。

HTMLの未来:ウェブデザインの進化とトレンドHTMLの未来:ウェブデザインの進化とトレンドApr 17, 2025 am 12:12 AM

HTMLの将来は、無限の可能性に満ちています。 1)新機能と標準には、より多くのセマンティックタグとWebComponentsの人気が含まれます。 2)Webデザインのトレンドは、レスポンシブでアクセス可能なデザインに向けて発展し続けます。 3)パフォーマンスの最適化により、応答性の高い画像読み込みと怠zyなロードテクノロジーを通じてユーザーエクスペリエンスが向上します。

HTML対CSS対JavaScript:比較概要HTML対CSS対JavaScript:比較概要Apr 16, 2025 am 12:04 AM

Web開発におけるHTML、CSS、およびJavaScriptの役割は次のとおりです。HTMLはコンテンツ構造を担当し、CSSはスタイルを担当し、JavaScriptは動的な動作を担当します。 1。HTMLは、セマンティクスを確保するためにタグを使用してWebページの構造とコンテンツを定義します。 2。CSSは、セレクターと属性を介してWebページスタイルを制御して、美しく読みやすくします。 3。JavaScriptは、動的でインタラクティブな関数を実現するために、スクリプトを通じてWebページの動作を制御します。

HTML:それはプログラミング言語か何か他のものですか?HTML:それはプログラミング言語か何か他のものですか?Apr 15, 2025 am 12:13 AM

htmlisnotaprogramminglanguage; itisamarkuplanguage.1)htmlStructuresandformatswebcontentusingtags.2)ItworkswithcsssssssssdjavascriptforInteractivity、強化を促進します。

HTML:Webページの構造の構築HTML:Webページの構造の構築Apr 14, 2025 am 12:14 AM

HTMLは、Webページ構造の構築の基礎です。 1。HTMLは、コンテンツ構造とセマンティクス、および使用などを定義します。タグ。 2. SEO効果を改善するために、などのセマンティックマーカーを提供します。 3.タグを介したユーザーの相互作用を実現するには、フォーム検証に注意してください。 4. JavaScriptと組み合わせて、動的効果を実現するなどの高度な要素を使用します。 5.一般的なエラーには、閉じられていないラベルと引用されていない属性値が含まれ、検証ツールが必要です。 6.最適化戦略には、HTTP要求の削減、HTMLの圧縮、セマンティックタグの使用などが含まれます。

テキストからウェブサイトへ:HTMLの力テキストからウェブサイトへ:HTMLの力Apr 13, 2025 am 12:07 AM

HTMLは、Webページを構築するために使用される言語であり、タグと属性を使用してWebページの構造とコンテンツを定義します。 1)htmlは、などのタグを介してドキュメント構造を整理します。 2)ブラウザはHTMLを分析してDOMを構築し、Webページをレンダリングします。 3)マルチメディア関数を強化するなど、HTML5の新機能。 4)一般的なエラーには、閉じられていないラベルと引用されていない属性値が含まれます。 5)最適化の提案には、セマンティックタグの使用とファイルサイズの削減が含まれます。

HTML、CSS、およびJavaScriptの理解:初心者向けガイドHTML、CSS、およびJavaScriptの理解:初心者向けガイドApr 12, 2025 am 12:02 AM

webdevelopmentReliesOnhtml、css、andjavascript:1)htmlStructuresContent、2)cssStylesit、および3)Javascriptaddsinteractivity、形成、

HTMLの役割:Webコンテンツの構造HTMLの役割:Webコンテンツの構造Apr 11, 2025 am 12:12 AM

HTMLの役割は、タグと属性を使用してWebページの構造とコンテンツを定義することです。 1。HTMLは、読みやすく理解しやすいようなタグを介してコンテンツを整理します。 2。アクセシビリティとSEOを強化するには、セマンティックタグなどを使用します。 3. HTMLコードの最適化により、Webページの読み込み速度とユーザーエクスペリエンスが向上する可能性があります。

See all articles

ホット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衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

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

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

SecLists

SecLists

SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強力な PHP 統合開発環境