Explain a, img, p, div elements with examples

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


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

Answer:

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

example: 
<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.

example:
<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.

Example: 
<p>GetWays Solution is Awsome</p>

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

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

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.