;标签用于获取有关网站所有者或文章作者的详细联系信息。它可能包括地址、电话、电子邮件、网站连接等等。 标签对于不同的上下文很有帮助,包括页面标题中的业务联系信息,或与作者相关的联系信息等。传统上,浏览器将
中包含的斜体文本视为斜体文本。标签。该标签通常也称为。地址>。通常,元素将包含在 元素以及其他细节。难道就不能用其他方式来识别地址吗?在本主题中,我们将学习 HTML 地址标签。语法
的语法标签将如下所示写入:
<html> <body> <address> Contact Information:<br> www.mycompany.com<br> #12345, Main Street<br> Name of City, Name of State </address> </body> </html>
以下是下面提到的以下属性
全局属性将用于与任何 HTML 元素上使用的属性相关。此类属性在所有 HTML 元素中都很普遍。
每当浏览器响应特定用户的干预时,就会发生事件。当用户单击鼠标、上传文档或图片、播放视频或在网页上执行任何其他活动时。
窗口事件属性在窗口对象启动时使用。
可以在表单内发生的事件被视为流程中的事件。当用户打开或关闭表单、在表单之间切换或对包含数据的表单进行操作时,会发生表单事件。
Here are the following examples mention below
<!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:
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:
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:
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:
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:
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:
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:
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中文网其他相关文章!