Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 37 - 2609_Logiccode
P. 37

    LINKS AS BUTTONS
                     HTML allows you to use hyperlinks as buttons. The following HTML code uses the <A> tag to create

                     buttons using hyperlinks:
                     Code 4. Write the HTML code to present the given web page using the <A> tag to create buttons.

                     <!DOCTYPE HTML>
                     <HTML>

                     <HEAD>

                     <TITLE>
                     Using Link as Button

                     </TITLE>

                     <STYLE>
                     A {BACKGROUND-COLOR: DODGERBLUE;COLOR: WHITE;

                     PADDING: 14PX 25PX;}

                     A:HOVER {BACKGROUND-COLOR: ROYALBLUE;}
                                                                                                SHORT KEY
                     </STYLE>                                                                        To save your code
                     </HEAD>                                                                         in Notepad:

                     <BODY>                                                                           Ctrl +      S
                     <H1>Links as Buttons</H1>

                     Click this link to open Google search.

                     <BR><BR>
                     <A HREF="HTTPS://WWW.GOOGLE.COM/">Click Me</A>

                     </BODY>

                     </HTML>

                               INSERTING IMAGES IN HTML

                     Images can improve your web design and the appearance of a web page. You can add drawings,
                     charts, paintings, maps or photographs to your web page. In HTML, images can be added to your
                     web page using the <IMG> tag. It is an empty tag and does not have a closing tag. The <IMG> tag
                     tells the browser which image to display and how text will be placed around it.

                     Image file formats that are most commonly used on the web are: Graphics Interchange Format
                     (GIF), Joint Photographic Experts Group (JPEG) and Portable Network Graphics (PNG).

                                                                                               Making Web Pages Alive  35

| 32 33 34 35 36 37 38 39 40 41 42 |