Link and Image Tags

 


Tags for Adding Links and Images
Markup Output Attributes
Anchor Tags with Hypertext References for Creating Links
To create a link to a different web page, use the URL you want to go to as the value of the href attribute.
The target attribute specifies where the link will open; use  _blank to open it in a new tab or window.

<a href="https://jaxpubliclibrary.org" target="_blank">JPL Home Page</a> 
JPL Home Page ATTRIBUTES incl.: 
- href 
- id [+ name] 
- class 
- title 
- style 
- target 
EVENT ATTRIBUTES are common in links.

To create a link to a different place on the same page, use the id of the target element, but add # to it first. Headings and tables are the most common internal targets. <a href="#image_tags"> Image Tags</a> Image Tags
To create an email link, just add mailto: before the email address. A separate email-server window will usually open when the link is clicked. 

<a href="mailto:edward_lein@hotmail.com"> E-mail Ed</a>
E-mail Ed
Tags for Inserting Images
The src (system resource controller) identifies the URL of the image file. The alternate attribute supplies a short description of the image, and is required for non-visual browsers. The title attribute supplies a pop-up message when the image is moused over. 

<img src="https://64.media.tumblr.com/f1a36fa897f864535f5320c5a3d3e444/tumblr_inline_nwfymgAsr71szepzs_250.png" width="75px" alt="JPL logo" title="Jacksonville Public Library" />
Note that links can be applied to images, as in this EXAMPLE:

<a href="https://jaxpubliclibrary.org" target="_blank">
<img src="https://64.media.tumblr.com/f1a36fa897f864535f5320c5a3d3e444/tumblr_inline_nwfymgAsr71szepzs_250.png" width="75px" alt="JPL logo" title="Jacksonville Public Library"></a>
JPL logo






JPL logo
ATTRIBUTES incl.: 
- id [+ name] 
- class 
- title 
- style 
- height (px or %) 
- width (px or %) 
- alt  
DISAPPROVED: align, border, hspace, vspace 
For related information see W3Schools' introduction to image maps.

No comments:

Post a Comment

Beginner's Guide to HTML ADDITIONAL PAGES : Approved Properties and Values (CSS Reference) Basic Tags for Text Markup Cha...