Home>Article>Web Front-end> Beginner's article: How to use thetag to create a link (share)
In the previous article "Teach you step by step how to use the img tag to add image effects (knowledge)", I introduced you how to use the img tag to add image effects. The following article will show you how to create anclick link. Newbies, please take a look.
#Tag: It is a hyperlink tag in HTML, usually starting with "" appears in pairs.
href attribute:Specify the link address and specify the text to be displayed inside theelement.
php中文网The code rendering is as follows ##
Not only can it contain text, You can also include other elements, such asThe code example is as follows
我是PHP中文
The code rendering is as follows
Can contain pictures (the previous article has detailed description of picture elements).
The code example is as follows
The code rendering is as follows
Click any of the links above and you will find that the new page will be on the current page Open, the current page will be overwritten. Sometimes we don't want the current page to be overwritten. Can we let it open in a new tab?
No problem, we can use the target attribute to specify the click jump method.
target attribute: There are a total of the following values, of which the first two are the most commonly used
: In new Open in window;
: Default. Open in the same frame;
: Open in the parent frame set;
: Open in the entire window.
The above is the detailed content of Beginner's article: How to use thetag to create a link (share). For more information, please follow other related articles on the PHP Chinese website!