The URL type represents Uniform Resource Locators (web addresses and other resource identifiers).
Type URL | https://rustybeam.net/schema/URL |
---|---|
Base Type | url |
Default Pattern | ^(?:https?|ftp|file|mailto|data|tel|ws|wss):(?://)?[\w\-._~:/?#[\]@!$&'()*+,;=%]+$ |
Constraints | {"format": "RFC 3986"} |
The default validation pattern accepts URLs with these schemes:
http://
, https://
ftp://
file://
mailto:
data:
tel:
ws://
, wss://
https://example.com/path/to/page
http://localhost:8080/api
ftp://ftp.example.com/files/doc.pdf
mailto:user@example.com
file:///home/user/document.txt
data:text/plain;base64,SGVsbG8gV29ybGQ=
tel:+1-555-123-4567
ws://localhost:3000/socket
<tr itemscope itemtype="https://rustybeam.net/schema/Property">
<td><span itemprop="name">homepage</span></td>
<td><span itemprop="type">URL</span></td>
<td><span itemprop="cardinality">0..1</span></td>
<td><span itemprop="description">The organization's homepage</span></td>
</tr>
<a itemprop="homepage" href="https://example.com">Visit our website</a>
Note: When using URLs in HTML, it's recommended to use appropriate elements like <a href>
for links or <img src>
for images, with the URL in the relevant attribute.