Detailed answer
An absolute URL includes the scheme and host.
A relative URL resolves against the document base URL; a root-relative path begins at the site root. Choose paths with deployment location in mind and test nested pages. A link working from the homepage can still fail from a deeper directory.
Example
<a href="https://htmlcoderunner.com/">Absolute</a>
<a href="/guidelines/">Root-relative</a>
<a href="lesson.html">Document-relative</a>
Understanding the behavior
Relative references are resolved against the document's base URL, which usually comes from the page URL unless base changes it. A leading slash starts at the current origin root; a path without that slash is resolved relative to the current directory.
Practical implementation notes
Test the same link from a nested route and from the homepage. Many broken resource paths only appear after deployment under a deeper path or after a missing trailing slash changes URL resolution.
How to check it
Resolve the same href from both documents and compare the resulting addresses.
Expected result
The intended absolute, root-relative, or document-relative path is clear.
Watch out: A leading slash does not mean the current folder.
Read the reference ↗