Recent Posts

Responsive Advertisement

html coding - Part 6 - HTML Links and Images

 HTML Links and Images.

HTML Links
Links are used to connect web pages, email addresses, or other resources.
Link Syntax
HTML
<a href="[URL]">Link Text</a>
Examples
  • Internal Link: <a href="about.html">About Us</a>
  • External Link: <a href="https://www.example.com">Visit Example.com</a>
  • Email Link: <a href="mailto:user@example.com">Email Us</a>
  • Phone Link: <a href="tel:+1234567890">Call Us</a>
Link Attributes
  • href: Specifies the link URL
  • title: Specifies a tooltip or link title
  • target: Specifies where to open the link (e.g., _blank for new tab)
HTML Images
Images are used to add visual content to web pages.
Image Syntax
HTML
<img src="[Image URL]" alt="[Alternative Text]">
Examples
  • Image: <img src="image.jpg" alt="An image on the page">
  • Image with Link: <a href="https://www.example.com"><img src="image.jpg" alt="Example.com"></a>
Image Attributes
  • src: Specifies the image URL
  • alt: Specifies alternative text for the image
  • width and height: Specify the image dimensions
Best Practices
  • Use descriptive link text and alternative text for images.
  • Use the title attribute to provide additional link information.
  • Use the alt attribute to provide alternative text for images.

Post a Comment

0 Comments


Comments

Ad Code

Responsive Advertisement