Explain a, img, p, div elements with examples

Explain <a> <img> <p> <div> elements with examples

Explain <a> <img> <p> <div> elements with examples


  • <a>
it defines a hyperlink, which is used to link from one page to another most important attribute of <a> is href.

<a href="https://www.getwayssolution.com/">GetWays Solution</a>

  • <img>
it defines the image in HTML page most important attribute for image tag is src and alt is an optional attribute it will display text inside alt attribute if there is some problem in image.

<img src="GetWays.png" alt="Baba Techno">

  • <p>
it defines paragraph all the default condition will be set if we use <p> which is required for paragraph we can further modify it too by using CSS.

<p>GetWays Solution is Awsome</p>

  • <div>
it is used to create section or container in html.

<div id="div1">
<h1>GetWays Solution</h1>
<p>Please Share</p>

we can style the whole div with id div1 as a container.

Other Question With Answer

No comments:

For Query and doubts!

Powered by Blogger.