Both examples above are using an
absolute URL
(a full web address) in the
href
attribute.
A local link (a link to a page within the same website) is specified with a relative URL (without the "https://www" part).
Example:
HTML
<h2>Absolute URLs</h2>
<p><a href="https://www.w3.org/" target="_blank">W3C</a></p>
<p><a href="https://www.google.com/" target="_blank">Google</a></p>
<h2>Relative URLs</h2>
<p><a href="html_images.asp">HTML Images</a></p>
<p><a href="/css/default.asp">CSS Tutorial</a></p>
Example of HTML Links | HTML Basic |
Definition of HTML Text Link | HTML Basic |
HTML Links - The target Attribute | HTML Basic |
Absolute URLs vs. Relative URLs | HTML Basic |
HTML Links - Use an Image as a Link | HTML Basic |
HTML Link to an Email Address | HTML Basic |
HTML Button as a Link | HTML Basic |
HTML Link Titles | HTML Basic |
HTML Absolute URLs | HTML Basic |
HTML Relative URLs | HTML Basic |
Chapter Summary of HTML Links | HTML Basic |
HTML Documents | HTML Basic |
HTML <!DOCTYPE> Declaration | HTML Basic |
HTML Headings | HTML Basic |
HTML Paragraphs | HTML Basic |
HTML Text Links | HTML Basic |
HTML Images | HTML Basic |
How to View HTML Source | HTML Basic |
Type
: |
html |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Basic |
Uploaded by
: |
Admin |