- Address element in html
- Examples
- Attributes
- Best Practices
- Accessibility Considerations
- Browser Compatibility
- : The Contact Address element
- Try it
- Attributes
- Usage notes
- Examples
- Result
- Technical summary
- Specifications
- Browser compatibility
- See also
- Found a content problem with this page?
- MDN
- Support
- Our communities
- Developers
- Address element in html
- Кратко
- Пример
- Как понять
- Подсказки
- На практике
- Денис Ежков советует
- HTML: tag
- Description
- Syntax
- Sample Output
- Attributes
- Note
- Browser Compatibility
- Example
- HTML5 Document
- HTML 4.01 Transitional Document
- XHTML 1.0 Transitional Document
- XHTML 1.0 Strict Document
- XHTML 1.1 Document
Address element in html
The address element in HTML represents the contact information for its nearest article or body ancestor. It typically contains the name of the person or organization, their street address, city, state, and zip code, and their phone number and email address. The address element is typically displayed in italicized text and is intended to be used for providing contact information for its surrounding content.
Examples
DOCTYPE html> html> body> h1>My Websiteh1> address> Written by: John Doebr> Contact information: a href="mailto:[email protected]">[email protected]a> address> body> html>
Attributes
This element makes use of the global attributes.
Best Practices
- The element should only be used to provide contact information for the author or owner of the page or article.
- The element should not be used to provide the contact information of other people or organizations.
- The contact information provided in the element should be written in a standard format, such as a postal address or email address.
- The element should not contain other HTML elements, such as headings or lists.
- The element should not be used to stylize text. If you want to style the text within the element, use CSS styles instead.
- The element should not be used to create links. Use the element to create links within the element.
Accessibility Considerations
This element is used to denote the contact information for the author or owner of the current document or article, and should be placed at the end of the document or article.
To improve accessibility, it is recommended to use the «aria-label» attribute to provide a descriptive label for the address element. This can help screen readers understand the purpose of the element and provide the information to the user in a more accessible manner. Additionally, using semantic HTML tags within the address element, such as the «p» tag for paragraphs and the «a» tag for links, can also improve accessibility and assistive technology support.
Browser Compatibility
: The Contact Address element
The HTML element indicates that the enclosed HTML provides contact information for a person or people, or for an organization.
Try it
The contact information provided by an element’s contents can take whatever form is appropriate for the context, and may include any type of contact information that is needed, such as a physical address, URL, email address, phone number, social media handle, geographic coordinates, and so forth. The element should include the name of the person, people, or organization to which the contact information refers.
can be used in a variety of contexts, such as providing a business’s contact information in the page header, or indicating the author of an article by including an element within the .
Attributes
This element only includes the global attributes.
Usage notes
Examples
This example demonstrates the use of to demarcate the contact information for an article’s author.
address> You can contact author at a href="http://www.somedomain.com/contact"> www.somedomain.coma>.br /> If you see any bugs, please a href="mailto:webmaster@somedomain.com"> contact webmastera>.br /> You may also want to visit us:br /> Mozilla Foundationbr /> 331 E Evelyn Avebr /> Mountain View, CA 94041br /> USA address>
Result
Technical summary
Content categories | Flow content, palpable content. |
---|---|
Permitted content | Flow content, but with no nested element, no heading content ( , h1, h2, h3, h4, h5, h6), no sectioning content ( , , , ), and no or element. |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parents | Any element that accepts flow content, but always excluding elements (according to the logical principle of symmetry, if tag, as a parent, can not have nested element, then the same content can not have tag as its parent). |
Implicit ARIA role | No corresponding role |
Permitted ARIA roles | Any |
DOM interface | HTMLElement Prior to Gecko 2.0 (Firefox 4), Gecko implemented this element using the HTMLSpanElement interface |
Specifications
Browser compatibility
BCD tables only load in the browser
See also
Found a content problem with this page?
This page was last modified on Apr 13, 2023 by MDN contributors.
Your blueprint for a better internet.
MDN
Support
Our communities
Developers
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998– 2023 by individual mozilla.org contributors. Content available under a Creative Commons license.
Address element in html
Выделите контактные данные на странице. Так поисковым роботам будет удобнее.
Время чтения: меньше 5 мин
Обновлено 13 сентября 2021
Кратко
Скопировать ссылку «Кратко» Скопировано
Тегом размечается контактная информация о человеке, людях или организации.
Пример
Скопировать ссылку «Пример» Скопировано
С автором статьи можно связаться:
По эл. почте: article@auth.or По телефону: +7(777)888-99-00p>С автором статьи можно связаться:p> address> По эл. почте: a href="mailto:article@auth.or">article@auth.ora>br> По телефону: a href="tel:+77778889900">+7(777)888-99-00a> address>
Как понять
Скопировать ссылку «Как понять» Скопировано
На странице может присутствовать контактная информация разного рода: почтовые адреса, адреса электронной почты, номера телефона, ссылки на соцсети, географические координаты, адреса URL и так далее. Такую информацию мы размечаем тегом . Желательно также, чтобы помимо этой информации присутствовало имя человека (или людей), либо название организации. В общем, этот тег может использоваться в совершенно разных случаях: от представления контактной информации о компании в шапке сайта до прямого указания на автора статьи внутри тега .
Подсказки
Скопировать ссылку «Подсказки» Скопировано
💡 По умолчанию содержимое тега выделяется на вёрстке курсивом.
💡 Есть ряд ограничений на содержимое тега :
- Нельзя вкладывать теги друг в друга.
- Нельзя вкладывать в параграф с текстом, это не фразовый элемент.
- Внутри нельзя использовать заголовки, секционные теги ( , , , ), а также теги и .
На практике
Скопировать ссылку «На практике» Скопировано
Денис Ежков советует
Скопировать ссылку «Денис Ежков советует» Скопировано
🛠 В реальных проектах этим тегом чаще всего размечают блок со ссылками на соцсети в подвале сайта, телефоны в шапке, контактную информацию в подвале и на отдельной странице. Если у вас блог, куда пишут разные авторы, то круто, если этим тегом вы будете размечать имена или контактную информацию авторов статей.
HTML: tag
This HTML tutorial explains how to use the HTML element called the tag with syntax and examples.
Description
The HTML tag defines contact information for the nearest or ancestor in the HTML document. Browsers traditionally render the text found within the tag as italicized text. This tag is also commonly referred to as the element.
Syntax
In HTML, the syntax for the tag is:
You can contact us at:
TechOnTheNet.com
123 Somewhere St.
City, State
Sample Output
Attributes
Only the Global Attributes apply to the tag. There are no attributes that are specific to the tag.
Note
- The HTML element is found within the tag.
- The tag provides contact information for the nearest ancestor in HTML 4.01.
- The tag provides contact information for the nearest or ancestor in HTML5.
- The tag is generally placed within the , for the or .
- Do not place the publication date within the tag, instead use the tag.
- For IE browsers older than IE 9, use HTML5shiv which is a javascript workaround to provide support for the new HTML5 elements such as: , , , , , , .
- Most browsers will render the text within the tag as italicized text but you can change this behavior with CSS.
Browser Compatibility
The tag has basic support with the following browsers:
- Chrome
- Android
- Firefox (Gecko)
- Firefox Mobile (Gecko)
- Internet Explorer (IE)
- Edge Mobile
- Opera
- Opera Mobile
- Safari (WebKit)
- Safari Mobile
Example
We will discuss the tag below, exploring examples of how to use the tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.
HTML5 Document
If you created a new web page in HTML5, your tag might look like this:
Heading for Article
Text that appears under article
In this HTML5 Document example, we have created an tag and a tag. Within the tag, we have placed an tag which will contain the contact information for the tag.
HTML 4.01 Transitional Document
If you created a new web page in HTML 4.01 Transitional, your tag might look like this:
You can contact us at:
TechOnTheNet.com
123 Somewhere St.
City, State
In this HTML 4.01 Transitional Document example, we have created a tag with a class called «footer» which contains the tag.
XHTML 1.0 Transitional Document
If you created a new web page in XHTML 1.0 Transitional, your tag might look like this:
You can contact us at:
TechOnTheNet.com
123 Somewhere St.
City, State
In this XHTML 1.0 Transitional Document example, we have created a tag with a class called «footer» which contains the tag.
XHTML 1.0 Strict Document
If you created a new web page in XHTML 1.0 Strict, your tag might look like this:
You can contact us at:
TechOnTheNet.com
123 Somewhere St.
City, State
In this XHTML 1.0 Strict Document example, we have created a tag with a class called «footer» which contains the tag.
XHTML 1.1 Document
If you created a new web page in XHTML 1.1, your tag might look like this:
You can contact us at:
TechOnTheNet.com
123 Somewhere St.
City, State
In this XHTML 1.1 Document example, we have created a tag with a class called «footer» which contains the tag.