Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 33 - 2609_Logiccode
P. 33

    You are already familiar with basic HTML formatting using tags and attributes. You also learnt
                     about styling using CSS. In this chapter, you are going to learn how you can add links, images and
                     insert videos and audio in web pages.

                               HYPERLINKS

                     A website is a collection of web pages. These web pages are linked with the help of a feature of
                     HTML called a hyperlink.

                     An HTML link or hyperlink, contains a URL and lets you jump from one web page to another.
                     It can be text, an image or a button and typically navigates between pages on the same site or
                     to different websites.

                     In browsers, links appear as underlined blue text when unvisited and purple after being clicked.
                     You can also use the Tab key to focus on a link and Enter to open it. When hovering over it, the
                     mouse pointer turns into a hand. HTML supports two types of links:

                       Internal linking connects sections within a web page. For example, a table of contents with
                        links at the top allows readers to jump to sections, bypassing the need to scroll.

                       External  linking connects  your page  to  another,  either  on your local disk  or the Internet.
                        It directs visitors to additional resources on other sites, useful for sharing sources or references
                        in blogs or research papers.

                     ANCHOR TAG
                     The Anchor tag is used to insert hyperlinks in HTML. It is a container tag. You can place images,
                     text, audio, video or buttons between opening and closing tags.

                     The following table summarises the attributes that can be used along with this tag to create
                     hyperlinks:

                             Attribute                   Value                             Description
                              Name

                                                                           It is also known as Hypertext Reference.
                      HREF                      URL                        It contains the URL to which the hyperlink
                                                                           points. It can be an external or internal link.

                                                _blank, _self, _parent,  It is used to define where to open the new
                      TARGET
                                                _top                       web page.

                     The uses of different values of the target attribute:
                       _blank: It opens the link in a new window.

                       _parent: It opens the linked document in a parent frame.

                                                                                               Making Web Pages Alive  31

| 28 29 30 31 32 33 34 35 36 37 38 |