WEB DEVELOPMENT SERIES(PART - 2)

Bhavya Tyagi
2 min readFeb 26, 2021

--

This blog is part of the Web Development series.

In this part of this series we will discuss some more basic concepts of HTML.

HTML LINKS

What is a Link?

It is a connection from one web resource to another. A link has two ends, an anchor and direction. The link starts at the “source” anchor and points to the “destination” anchor, which may be any Web resource such as an image, a video clip, a sound bite, a program, an HTML document or an element within an HTML document.

Syntax:

<a href=”https://www.theuworld.org”>THEUWORLD</a>

The link’s destination is specified in the href attribute. Attributes are used to provide additional information about HTML elements. We will learn more about attributes later.

HTML IMAGES

Let’s see how to add images on a webpage.

Adding images on a webpage:

The “img” tag is used to add images on a webpage. The “img” tag is an empty tag, which means it can contain only a list of attributes and it has no closing tag.

Syntax:

<img src=”https://resi.ze-robot.com/dl/4k/4k-desktop-wallpaper.-1920%C3%971200.jpg” alt=”desktop wallpaper”>

Attribute:

  • src:
    src stands for source. Every image has a src attribute which tells the browser where to find the image you want to display. The URL of the image provided points to the location where the image is stored.
  • alt:If the image cannot be displayed then the alt attribute acts as an alternative description for the image. The value of the alt attribute is an user-defined text.

We can also set the width and height of the images by using width and height attributes. But we will discuss these attributes briefly later.

First of all let’s implement all the concepts in a single html document which we have discussed till date:

<!DOCTYPE html>
<html>
<body>

<h2>HTML Images</h2>
<p>HTML images are defined with the img tag:</p>

<a href=”https://www.theuworld.org”>THEUWORLD</a>

<img src=”https://resi.ze-robot.com/dl/4k/4k-desktop-wallpaper.-1920%C3%971200.jpg” alt=”desktopwallpaper”>

</body>
</html>

Output:

OUTPUT

So, now let’s end this blog here and in next blog we will learn some more basics of HTML in brief like HTML Styles, HTML Formatting etc.

“Until then Goodbye, Stay Safe!”

--

--

Bhavya Tyagi
Bhavya Tyagi

Written by Bhavya Tyagi

I’m Bhavya Tyagi. Originally hailing from India. I’ve been honing my skills in design and development.

No responses yet