Content · Web Development · HTML

HTML ugc Rel Token: Reference and Examples

Learn what rel="ugc" means in HTML, when to use it and what browsers or search engines may do with it.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Links do more than move people between pages. The HTML rel attribute describes the relationship between your page and another resource. The value ugc means: marks a link supplied in user-generated content.

What ugc means


Marks a link supplied in user-generated content.

Write it as rel="ugc" on an appropriate <a> or <link> element. Not every relationship is defined for both: the correct element depends on the link type.

Example markup


<!-- Relationship: ugc -->
<a href="https://member.example.test" rel="ugc">Member page</a>

What the browser does


This example uses <a>, which displays a regular link. The visible link text tells readers where it leads; the rel value adds information for browsers, search engines or other software.

UGC is a search-engine hint, not a sanitizer; validate untrusted URLs.

If a user supplies a link, validate or restrict URL schemes as well as marking the relationship.

This relationship value does not automatically restyle the link, change its accessible name or make a new page secure. Navigation and user-facing labels still need deliberate HTML.

When to choose this token


Use ugc only when the relationship is genuinely true for that destination. If it describes a web resource, make sure that resource exists and serves the right content. For an external URL, do not confuse a relationship hint with permission, security or a redirect.

Small practice task


Create a simple test page with the example. Inspect the resulting element in Developer Tools. Change the target to another sensible file or URL, then explain whether the visible page, a network request, or only the relationship metadata changed.

Common Beginner Mistakes


  • UGC is a search-engine hint, not a sanitizer; validate untrusted URLs.
  • Assuming rel="ugc" has the same effect on every kind of HTML link.
  • Adding a relationship token when the destination does not have that relationship.

Key Takeaways


  • ugc means marks a link supplied in user-generated content.
  • UGC is a search-engine hint, not a sanitizer; validate untrusted URLs.
  • Choose a valid link element and test what the browser actually does.
Share this resourceSend this page to someone who may find it useful.