Page 141 - CA_165_V2.0_Flipbook
P. 141

TARGET Attribute
                 The TARGET attribute specifies where to display the linked URL. Some of the values of 'Target' attribute are:

                   _blank: It opens the linked document in a new window or tab.
                   _self: It opens the linked document in the same window/tab as it was clicked. This is the default
                    behaviour.

                   _top: It opens the linked document in the full body of the window.

                 In the given example, it will open the linked document in a new browser window/tab:
                   <A HREF="url" TARGET="_blank">Text to Display as a Link.</A>
                 The following HTML code uses an external hyperlink that opens the link in a new tab:

                 <HTML>

                 <BODY>
                 <A HREF = https://www.orangeeducation.co.in/ TARGET="_BLANK">
                 Visit Orange Education
                 </A>

                 </BODY>
                 </HTML>
                 The output of the preceding HTML code is as follows:






                        HTML Anchor Tag
                         for External Link





                 Internal Linking

                 The internal linking links the various sections of the same document. By clicking on the linked button, the
                 linked part of the document is displayed on the screen. <A> (Anchor) tag is also used to make an internal
                 link i.e., it can be used to link the other sections of the same document.
                 To insert an internal linking, create the link to the segment/section that is to be displayed.

                 To define a segment/section in the document, NAME or ID attribute can be used in the document. Syntax
                 to create internal linking is as follows:

                   <A  ID= "Segment1"> Segment1 </A>
                   <A  HREF= "#Segment1"> Text </A>
                 For example, to set a segment in the document:

                   <A ID = "Segment1"> Segment1 </A>
                 After, linking that segment

                   <A HREF = "#Segment1"> Link to Segment1 </A>




                                                                                            More About HTML      139
   136   137   138   139   140   141   142   143   144   145   146