added href local directory reference (#30677)
* added href local directory reference * fixed: removed extra backtick
This commit is contained in:
committed by
Randell Dawson
parent
36da71fa49
commit
b4ebb8f8bc
@ -7,6 +7,8 @@ Hypertext Reference (HREF) is an HTML attribute that you use to specify a link d
|
||||
|
||||
The exact behavior of the HREF attribute depends on the element that is using it. For instance, when used with the `<a>` tag, it is referencing the location of an object expressed as a URL. When using the HREF attribute with the `<image>` tag, the HREF attribute is referencing the URL location of an image to render.
|
||||
|
||||
Additionally, an HREF may also reference a file on a server or a local directory. A directory can be considered a folder on a computer. For instance, you might wish to create a hyperlink that points to the main page of a website. Typically the main page of a website has the file name `index.html`, so instead of a full URL, you may simply type `index.html`. Please note that if the file is not in the same directory it may require you to add a `/` or a `../` to move into or out of the current directory.
|
||||
|
||||
### Examples:
|
||||
Link to Google's Homepage:
|
||||
|
||||
@ -26,6 +28,14 @@ Image as an Link:
|
||||
<img border="0" alt="Google" src="https://www.google.com/logos/doodles/2015/googles-new-logo-5078286822539264.3-hp2x.gif" width="100" height="100">
|
||||
```
|
||||
|
||||
Link to an index file on the same directory:
|
||||
|
||||
-> The text "Index File" acts like the link to a file titled `index.html`
|
||||
|
||||
```html
|
||||
<a href="index.html">Index File</a>
|
||||
```
|
||||
|
||||
Tags that use HREF:
|
||||
```html
|
||||
<a>
|
||||
|
Reference in New Issue
Block a user