HTML Links


<a>

The anchor tag <a> is used to create hyperlinks in HTML. It allows users to click and navigate to another webpage, a section on the same page, an email address, or a file.

Syntax:

<a href="URL">Link Text</a>

Example:

<a href="https://www.example.com">Visit Example</a>

Output:

Visit Example

Default Link Styles

Web browsers apply default colors and styles to hyperlinks unless customized with CSS.

Example:

<a href="https://example.com">Default Link</a>

Output:

Default Link

By default, web browsers display hyperlinks with built-in colors and underlines:


<a> (anchor tag) Attributes

target Attribute - it is used to specify where linked coument will open

Common values:

download Attribute - it is used to make the browser download the target file once the user clicks the link, rather than displaying it in the browser.

HTML Logo