mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-18 16:01:35 -04:00
feat(curriculum): Add interactive example to address element lesson (#62698)
This commit is contained in:
@@ -5,7 +5,7 @@ challengeType: 19
|
||||
dashedName: how-do-you-display-addresses-in-html
|
||||
---
|
||||
|
||||
# --description--
|
||||
# --interactive--
|
||||
|
||||
The contact address element is used to represent contact information for a section on a web page. The `address` element is versatile and can be used for business pages, author pages, personal sites, and more.
|
||||
|
||||
@@ -13,6 +13,8 @@ When it comes to building out your website's contact sections, you should use th
|
||||
|
||||
Here is an example of using the `address` element for a company contact page:
|
||||
|
||||
:::interactive_editor
|
||||
|
||||
```html
|
||||
<address>
|
||||
<h2>Company Name</h2>
|
||||
@@ -26,6 +28,8 @@ Here is an example of using the `address` element for a company contact page:
|
||||
</address>
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
In this example, there is the company name, physical address, phone, and email information. For the physical address, the line break element, `br`, is used to show the division between the street name, city, and country.
|
||||
|
||||
For the phone number, we have an anchor element with the `href` value set for telephone numbers. The `tel:+` value inside the `href` attribute creates a clickable link to initiate a phone call on certain devices that support that.
|
||||
|
||||
Reference in New Issue
Block a user