HTML a href link attribute
HTML a href is simply the syntax of hyperlinks. We have already done a basic introduction in another article (reference: HTML hyperlinks ). This article will be divided into two parts. First of all, let’s talk about the syntax of a href and Examples, then write a few examples of using CSS to beautify hyperlinks.
HTML a href basic syntax
<a href="Place the URL to be linked here" target="Link target" title="Alternative text for the link">Place the link text or image to be displayed here</a>
In the above grammar, the right side of the equal sign of a href is used to place the URL to go to, target is the meaning of the link target, which can be used to set the way to go to the link. Commonly, there is another window (_blank), direct Open in the current window (_self), open in the parent frame (_parent), etc. The target is an unnecessary item in the HTML a href attribute.
In addition, for the link text or picture to be displayed, it is no problem to put general text. If you want to put pictures, you can refer to this article: img href picture link .
HTML a href implementation example
with CSS for a href do a little landscaping
simply to beautify it with CSS 's text-decoration to remove the link to the bottom line, and the color changed to red.
example tells the browser to use CSS syntax, text-decoration:none means to remove the bottom line, and color:red is set to red.
Post a Comment
0 Comments