1 / 7

Creating Links in HTML—the HT

Creating Links in HTML—the HT. Chapter 2. Creating Links. <a> element</a> The <a> element is used to create a link to another page The content of the <a> element is the link text. In the browser, the link text appears with an underline to indicate you can click on it. Creating Links .

onella
Download Presentation

Creating Links in HTML—the HT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating Links in HTML—the HT Chapter 2

  2. Creating Links <a> element</a> • The <a> element is used to create a link to another page • The content of the <a> element is the link text. • In the browser, the link text appears with an underline to indicate you can click on it

  3. Creating Links • Once the text is in the link, you need to add HTML to tell the browser where to link the points to <a href=“elixir.html”>elixirs</a> • The href attribute is how you specify the destination of the lnk <a href=“directions.html”>driving directions</a>

  4. Creating Links • Use the <a> element to create a hypertext link to another web page • The content of the <a> element becomes clickable in the web page • The href attribute tells the browser the destination of the link

  5. Creating Links • When the user clicks on a link, the browser uses the href attribute to determine the page the link points to • If “elixirs” was clicked, the browser grabs the href value “elixir.html” • If “detailed directions” was clicked, the browser grabs the href value “directions.html”

  6. Understanding Attributes • Attributes give you a way to specify additional information about an element <style type=“text/css”>--specifies style language <a href=“irule.html”>--tells you the destination of a hyperlink <imgsrc=“sweetphoto.gif”>--specifies the filename of a picture

  7. Understanding Attributes • Example: • What if <car> were an element? • If <car> were an element, you would want to write something like this: • <car>My Red Mini</car> • But this <car> element only gives a descriptive name for your car—not the make, precise model, whether it is a convertible, etc. • So, if <car were really an element, you might want to use attributes like this: • <car> make=“Mini” model=“Cooper” convertible=“no”>My Red Mini</car>

More Related