検索

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:例と実用的なアプリケーションMay 09, 2025 am 12:01 AM

Web開発におけるHTML、CSS、およびJavaScriptの役割は次のとおりです。1。HTMLは、Webページ構造の構築に使用されます。 2。CSSは、Webページの外観を美化するために使用されます。 3. JavaScriptは、動的な相互作用を実現するために使用されます。タグ、スタイル、スクリプトを通じて、これら3つは最新のWebページのコア関数を構築します。

Lang属性をタグにどのように設定しますか?なぜこれが重要なのですか?Lang属性をタグにどのように設定しますか?なぜこれが重要なのですか?May 08, 2025 am 12:03 AM

タグのLang属性を設定することは、WebアクセシビリティとSEOを最適化する重要なステップです。 1)ラング属性をタグに設定します。 2)多言語コンテンツでは、ようなさまざまな言語パーツのLang属性を設定します。 3)「EN」、「FR」、「ZH」などのISO639-1標準に準拠する言語コードを使用します。Lang属性を正しく設定すると、Webページと検索エンジンランキングのアクセシビリティが向上します。

HTML属性の目的は何ですか?HTML属性の目的は何ですか?May 07, 2025 am 12:01 AM

htmlattributeSareSientionalentionalentionalentionalentiallyance'functionalityandappearance.theyaddinformationtodefinebehavior、light、and interaction、makewebsitesteractive、responsive、andviseallyappaleal.attributeslikesrc、href、class、型、およびdoadabledransform

HTMLでリストを作成するにはどうすればよいですか?HTMLでリストを作成するにはどうすればよいですか?May 06, 2025 am 12:01 AM

toreatealistinhtml、useforunorderedlistsandfororderedlists:1)forunorderedlists、wrapitemsinanduseforeachitem、renderingasabulletedlist.2)

HTMLアクション:Webサイト構造の例HTMLアクション:Webサイト構造の例May 05, 2025 am 12:03 AM

HTMLは、明確な構造のWebサイトを構築するために使用されます。 1)Webサイト構造などのタグを使用し、定義します。 2)例は、ブログとeコマースのウェブサイトの構造を示しています。 3)誤ったラベルネスティングなどの一般的な間違いを避けてください。 4)HTTP要求を削減し、セマンティックタグを使用してパフォーマンスを最適化します。

HTMLページに画像を挿入するにはどうすればよいですか?HTMLページに画像を挿入するにはどうすればよいですか?May 04, 2025 am 12:02 AM

to inertanimageintoanhtmlpage、usethetagwithsrcandaltattributes.1)usealttextforaccessibilityandseo.2)emplencesrcsetForresponsiveimages.3)applylazyloadingwithloading = "lazy" tooptimizeperformance.4)

HTMLの目的:Webブラウザがコンテンツを表示できるようにするHTMLの目的:Webブラウザがコンテンツを表示できるようにするMay 03, 2025 am 12:03 AM

HTMLの中心的な目的は、ブラウザがWebコンテンツを理解して表示できるようにすることです。 1。HTMLは、タグなどのタグを介してWebページの構造とコンテンツを定義します。 3.HTMLは、ユーザーの相互作用をサポートするフォーム要素を提供します。 4. HTMLコードの最適化は、HTTP要求の削減やHTMLの圧縮など、Webページのパフォーマンスを改善できます。

Web開発にとってHTMLタグが重要なのはなぜですか?Web開発にとってHTMLタグが重要なのはなぜですか?May 02, 2025 am 12:03 AM

htmltagsareSterenceforwebdevelovementasyStheStructureanhandhancewebpages.1)theydefineLayout、semantics、and-interactivity.2)semanticagsimprovecessibility.3)opeusofusofagscanoptimizeperformanceandensurecross-brows-compativeation。

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

Video Face Swap

Video Face Swap

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

ホットツール

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

VSCode Windows 64 ビットのダウンロード

VSCode Windows 64 ビットのダウンロード

Microsoft によって発売された無料で強力な IDE エディター

AtomエディタMac版ダウンロード

AtomエディタMac版ダウンロード

最も人気のあるオープンソースエディター

SublimeText3 Mac版

SublimeText3 Mac版

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