9jabaze - Entertainment | Webmaster | Browsing Tricks | Games/Apps Hub
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» Wapkiz 2020 Code: wapkiz register page responsive design Code
Difference between "div id" and "div class" in HTML EmptyThu Aug 13, 2020 5:15 pm by Hasty06

» 2020Bbnaija : Why I Can’t Be In A Relationship With Ozo – Nengi
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 9:44 pm by Adminkunlex

» Can You Have S*x On Your First Date? Check Out What Actress, Debbie Shokoya Has To Say About This
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 6:44 am by Adminkunlex

» Nigerian Singer, Seunfunmi Stephen, Recounts How Her Husband Was Killed By Stray Bullet
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 6:41 am by Adminkunlex

» Olakunle Churchill Shares Photo Of Himself And Actress Rosy Meurer As He Writes On The Importance Of Loyalty
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 6:39 am by Adminkunlex

» Ubi Franklin Reveals What Happened To Him When He Visited A Hospital Amid COVID-19 Pandemic
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 6:37 am by Adminkunlex

» Vardy Wins Premier League Golden Boot, Beats Ings, Aubameyang & Sterling
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 5:07 am by Adminkunlex

» The Right Way To Preach About Hell - Milton Goh
Difference between "div id" and "div class" in HTML EmptyMon Jul 27, 2020 5:03 am by Adminkunlex

» “Surgery For What?” – Regina Daniels Shows Off Hot Body After Childbirth (Video)
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 9:12 pm by Adminkunlex

» I Got Pregnant As A Virgin At 23 – Wathoni
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 8:24 pm by Adminkunlex

» #Bbnaija2020: Wathoni Kisses Kiddwaya During BBNaija Truth Or Dare Game
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 8:20 pm by Adminkunlex

» Bbnaija: Kiddywaya Gropes Erica’s Breast While Dancing And She Reacts
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 8:17 pm by Adminkunlex

» “I Hope To Collaborate With Rihanna & Drake Soon” – Rema
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:54 am by Adminkunlex

» “Girls That Give Threesome With Their Friend Have A Special Place In Heaven” – Naira Marley
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:50 am by Adminkunlex

» “To Be A Boss, You Must Be A Servant” – Frodd Recounts On His Humble Beginnings
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:48 am by Adminkunlex

» “Stop Pressuring Us With Your Beauty”, Actress Queen Nwokoye Begs Ini Edo
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:46 am by Adminkunlex

» You Look Like A Weed Smoker – Lady Fires Adekunle Gold Over New Look
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:43 am by Adminkunlex

» Davido Turns Chef, Spotted Cooking Probably For Chioma And His Crew
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:40 am by Adminkunlex

» Kanye West Apologizes To Kim Kardashian For Public Rants On Their Marriage
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 11:38 am by Adminkunlex

» [Lyrics] Korede Bello – Hey Babe
Difference between "div id" and "div class" in HTML EmptySun Jul 26, 2020 10:24 am by Adminkunlex

The most tagged keywords



Difference between "div id" and "div class" in HTML

Go down

Difference between "div id" and "div class" in HTML Empty Difference between "div id" and "div class" in HTML

Post by Adminkunlex on Sun Jan 19, 2020 9:15 am

In addition to setting a style for a HTML element, CSS allows you to specify your own selectors called "id" and "class".
1.THE ID SELECTOR:
The id selector is used to specify a style for a
single, unique element.
The id selector uses the id attribute of the HTML
element, and is defined with”#".
The style rule below will be applied to the element
with id="abc":
#abc
{
Text-align: center;
Color: red;
}
2.THE CLASS SELECTOR:
The class selector is used to specify a style for a
group of elements. Unlike the id selector, the class
selector is most often used on several elements.
This allows you to set a particular style for many
HTML elements with the same class.
The class selector uses the HTML class attribute, and
is defined with a "."
In the example below, all HTML elements with
class="center" will be center-aligned:
.center
{
Text-align: center;
}
A class can be used several times, while an ID can
only be used once, so you should use classes for
items that you know you're going to use a lot. An
example would be if you wanted to give all the
paragraphs on your webpage the same styling, you
would use classes.Common id elements are things
like header, footer, sidebar. Common class elements
are things like highlight or external-link.


Source

Adminkunlex
Admin

Posts : 1521
Points : 4576
Reputation : 0
Join date : 2019-06-08
Age : 21
Location : Osun State, Nigeria

https://9jabaze.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum