Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

The <div> tag is used as a container for HTML elements - which is

then styled with CSS or manipulated with JavaScript. The <div>


tag is easily styled by using the class or id attribute. Any sort of
content can be put inside the <div> tag!
<div> is a block-level element

Where do we use span tag?


The <span> tag is an inline container used to mark up a part
of a text, or a part of a document. The <span> tag is easily
styled by CSS or manipulated with JavaScript using the class
or id attribute.
https://www.youtube.com/watch?
v=hL93pLKLSLs
• One of the most common uses of class in CSS is to add a
specific style to a specific element.

• Where do we use ID and class in CSS?


• You should use a class if you need to use the
same selector more than once within a page or a
site. While an ID is specific to a single element,
classes can be assigned to multiple elements on a
page or throughout the website. They are not
unique
https://www.youtube.com/watch?
v=Wk7fVilcxsQ
https://www.youtube.com/watch?
v=VU3_kOwazt4

You might also like