;标签用于获取有关网站所有者或文章作者的详细联系信息。它可能包括地址、电话、电子邮件、网站连接等等。 标签对于不同的上下文很有帮助,包括页面标题中的业务联系信息,或与作者相关的联系信息等。传统上,浏览器将
中包含的斜体文本视为斜体文本。标签。该标签通常也称为。地址>。通常,元素将包含在 元素以及其他细节。难道就不能用其他方式来识别地址吗?在本主题中,我们将学习 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: 用于定义元素的 Tab 键顺序。
- 标题:用于提供元素的附加信息。
- translate:表示元素的内容是否可以翻译。
- 拼写检查:它定义元素内容的拼写检查。
- data: 用于在 HTML 和 DOM 描述之间交换私有数据。
- hidden:当需要隐藏元素时使用该属性
2.事件属性
每当浏览器响应特定用户的干预时,就会发生事件。当用户单击鼠标、上传文档或图片、播放视频或在网页上执行任何其他活动时。
3. Windows 事件属性
窗口事件属性在窗口对象启动时使用。
- onafterprint:需要打印文档时使用。
- onbeforeprint:在需要打印文档之前执行。
- onbeforeload:当文档将被卸载时使用。
- onblur:当窗口没有焦点时将定义此属性。
- onerror:下载文档时出现错误时定义。
- onload:加载网页内容时指定。
- onmessage:当消息中有原因时使用。
- onoffline:当浏览器在离线模式下工作时,将使用该属性。
- ononline:当浏览器处于在线模式时将使用此属性。
- onpagehide:当用户离开网页时指定。
- onpageshow: 当用户导航到网页时指定。
- onpopstate:当窗口历史记录发生更改时将使用此属性。
- onredo:当页面上有重做选项时使用。
- onresize:当用户调整窗口大小时指定。
- onstorage: 当网络存储有更新时定义。
- onundo:当有一个撤消选项被取消时使用。
- onunload:卸载网页内容时指定。
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
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:
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:
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:
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:
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:
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:
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中文网其他相关文章!

HTML的未来充满了无限可能。1)新功能和标准将包括更多的语义化标签和WebComponents的普及。2)网页设计趋势将继续向响应式和无障碍设计发展。3)性能优化将通过响应式图片加载和延迟加载技术提升用户体验。

HTML、CSS和JavaScript在网页开发中的角色分别是:HTML负责内容结构,CSS负责样式,JavaScript负责动态行为。1.HTML通过标签定义网页结构和内容,确保语义化。2.CSS通过选择器和属性控制网页样式,使其美观易读。3.JavaScript通过脚本控制网页行为,实现动态和交互功能。

HTMLISNOTAPROGRAMMENGUAGE; ITISAMARKUMARKUPLAGUAGE.1)htmlStructures andFormatSwebContentusingtags.2)itworkswithcsssforstylingandjavascript for Interactivity,增强WebevebDevelopment。

HTML是构建网页结构的基石。1.HTML定义内容结构和语义,使用、、等标签。2.提供语义化标记,如、、等,提升SEO效果。3.通过标签实现用户交互,需注意表单验证。4.使用、等高级元素结合JavaScript实现动态效果。5.常见错误包括标签未闭合和属性值未加引号,需使用验证工具。6.优化策略包括减少HTTP请求、压缩HTML、使用语义化标签等。

HTML是一种用于构建网页的语言,通过标签和属性定义网页结构和内容。1)HTML通过标签组织文档结构,如、。2)浏览器解析HTML构建DOM并渲染网页。3)HTML5的新特性如、、增强了多媒体功能。4)常见错误包括标签未闭合和属性值未加引号。5)优化建议包括使用语义化标签和减少文件大小。

WebDevelovermentReliesonHtml,CSS和JavaScript:1)HTMLStructuresContent,2)CSSStyleSIT和3)JavaScriptAddSstractivity,形成thebasisofmodernWebemodernWebExexperiences。

HTML的作用是通过标签和属性定义网页的结构和内容。1.HTML通过到、等标签组织内容,使其易于阅读和理解。2.使用语义化标签如、等增强可访问性和SEO。3.优化HTML代码可以提高网页加载速度和用户体验。

htmlisaspecifictypefodyfocusedonstructuringwebcontent,而“代码” badlyLyCludEslanguagesLikeLikejavascriptandPytyPythonForFunctionality.1)htmldefineswebpagertuctureduseTags.2)“代码”代码“ code” code code code codeSpassSesseseseseseseseAwiderRangeLangeLangeforLageforLogageforLogicIctInterract


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

禅工作室 13.0.1
功能强大的PHP集成开发环境

记事本++7.3.1
好用且免费的代码编辑器

安全考试浏览器
Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

WebStorm Mac版
好用的JavaScript开发工具

mPDF
mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),