Giter Site home page Giter Site logo

html-tutorial-ex's Introduction

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:

<a href="sourceurl">Displayed Text</a>

As in any tag, there's a basic structure of <tag attr="value">content</tag>. 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:

<a href="https://google.com">Google Owns All Your Data</a>

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, 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 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 has lots more detail about this and every HTML tag!

html-tutorial-ex's People

Contributors

titaniumbones avatar

Watchers

 avatar

html-tutorial-ex's Issues

RE: Submission

Also, I was playing around with the commits while you were explaining them. Maybe some of them got pushed. The submission itself is fine, however.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.