https://github.com/titaniumbones/html-tutorial-ex
A quick example of how to write a simple HTML tutorial
https://github.com/titaniumbones/html-tutorial-ex
assignment coursework html-tutorial
Last synced: 9 months ago
JSON representation
A quick example of how to write a simple HTML tutorial
- Host: GitHub
- URL: https://github.com/titaniumbones/html-tutorial-ex
- Owner: titaniumbones
- Created: 2017-08-26T00:16:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-10T18:15:14.000Z (about 8 years ago)
- Last Synced: 2025-03-27T06:36:41.103Z (9 months ago)
- Topics: assignment, coursework, html-tutorial
- Language: HTML
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Understanding `a` tags in HTML
The `a` tag is a fundamental HTML element responsible for much of the linking goodn ess that makes HTML great!
## Components
Let's take a quick look at how the tag works:
``` html
Displayed Text
```
As in any tag, there's a basic structure of ```content```. The fantastic, amazing attribute in the `a` tag is `href` -- short for "hypertext reference". The `href` attribute identifies a target URL; when this HTML snippet is displayed in a browser, the browser will direct you to the URL in the href attribute. Let's try it out:
``` html
Google Owns All Your Data
```
As with most HTML tags, the `a` tag accepts a number of possible attributes. Some of them are used only rarely, but you will often see the `target` attribute in the real world. THis allows you to specify where to open the link you click on:
- `_self` means "open here"
- `_blank` means "open in a new tab"
- `_parent` means "if you're looking at an [internal frame](https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe), open this link in the frame's arent tab. Otherwise, just open here like in `_self`
## Try it yourself
You can clone this repository and load a local copy of [the tutorial page](./a-tag-tutorial.html) in your browser to see the tag in action. Then make some changes to the file to learn this yourself!
## Learn More
The [Mozilla Developer Network](https://developer.mozilla.org/en/docs/Web/HTML/Element/a) has lots more detail about this and every HTML tag!