0
Can you tell me please target attributes
4 Réponses
+ 3
target attribute is used to define where the link will be opened, it is covered in the lesson:
https://www.sololearn.com/learn/HTML/1031/
More available options for target attribute value see here:
https://www.w3schools.com/html/html_links.asp
+ 3
Okay, let me try that again, you see, when you click/tap on a hyperlink, you will be taken to a different page, and the target attribute signifies where you want this new page to load.
The _self option, will load the new page in the current browser window or tab. The _self option is the default, meaning, if your hyperlink doesn't specify target attribute, the new page will load in current window or tab.
The _blank option tells the browser to load the new page in a new window or tab, so that the document where the hyperlink was located isn't overlapped by the new page. This is like when you long press (on mobile browser) or right click a hyperlink and pick "Open in new tab" or something like that.
I think you don't need to worry much about it, just remember 2 of them, the _blank and _self, other options for target attribute seem to be rarely used.
Hth, cmiiw
+ 2
The best way to understand the target attribute effect is to try each possible value in your code and see the outcome directly. Also I guess the effect will be more observable if you test it on a PC/laptop rather than on mobile device (probably).
P.S. The w3schools link above covered that with more detail, did you not find it clear enough? I'm afraid I can't explain it any better than they did : )
0
lpang i already completed that lesson but dont understand