0% found this document useful (0 votes)
41 views1 page

8 - PDFsam - HTML Study Material

Div and span tags are used to group related HTML elements. The div tag is used for block-level grouping, while the span tag is used for inline grouping. Both tags can be styled with CSS. Attributes like src and alt provide extra information to tags - src specifies the image source for the <img> tag, while alt provides alternate text if the image fails to load.

Uploaded by

ROHIT JAIN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

8 - PDFsam - HTML Study Material

Div and span tags are used to group related HTML elements. The div tag is used for block-level grouping, while the span tag is used for inline grouping. Both tags can be styled with CSS. Attributes like src and alt provide extra information to tags - src specifies the image source for the <img> tag, while alt provides alternate text if the image fails to load.

Uploaded by

ROHIT JAIN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Div and Span Tags:

We can use div and span tags to group related tags into a single unit.

In general we can use these tags with CSS.

Eg

1) <div class="groupone">
2) <h1> Group One Content</h1>
3) <p>This division tag helpful to style a group of
4) html tags with css</p>
5) </div>

div means division

<span> tag is exactly same as division tag except that it is inline. i.e to define group within the line
of text we can use <span> tag.

<p>This <span>division tag helpful</span> to style a group of html tags with css</p>

<div> will work for group of lines where as <span> will work within the line.

Note: <div> and <span> tags are helpful only for styling html. Hence they will always work with
css only.

Attributes:
HTML Attributes will provide extra information to HTML tags.

To insert image in the html page, src attribute specify location of the image to the <img> tag.

Setting Image inside HTML:


<img src="guido.jpg" alt="OOPS Image is missing">

src means source where we have to specify the image source(complete location). We can take
image address from the google also.

alt means alternate. If image is missing then broken link image will display.In this case if we want
to display some meaningful text information then we should go for alt attribute.

Note: We have to open the tag and we are not responsible to close the tag,such type of tags are
called self closing tags.

Eg <img> tag

nd
DURGASOFT, # 202, 2 Floor, HUDA Maitrivanam, Ameerpet, Hyderabad - 500038,
8  040 – 64 51 27 86, 80 96 96 96 96, 92 46 21 21 43 | www.durgasoft.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy