HomeХобби и стильRelated VideosMore From: EJ Media

CSS Tutorial for Beginners - 03 - Multiple selectors and writing rule for more than one element

818 ratings | 265984 views
In this video we go over how to write rule for more than one element. Source: http://pastebin.com/Y1jPc3vP
Html code for embedding videos on your blog
Text Comments (40)
Prashandip Lunghimba (2 months ago)
thank yo so much for these tutorials ... :)
rohini tainana (3 months ago)
u r my god
KARTHICKRAJA M (6 months ago)
SOURCE CODE ============== index.html ------------------ <!DOCTYPE html> <html> <head> <title>Fish</title> <style type="text/css"> h1,h2 { background-color:purple; } h1 { color: pink; } p { color:red; font-size:25px; font-family:Arial, Helvetica, sans-serif; } </style> </head> <body> <h1>The Fish Webiste</h1> <p>Welcome to the Fish Website.Everything you want to now about fish is in this website</p> <h2>This is a section on Bass fish</h2> <p>bass fish lives in lake</p> </body> </html>
Maggie Blyth (7 months ago)
Great videos, they are so easy to follow and understand. I am putting in comments as i go along in notepad but i noticed if you place a comment inside the { }it stops the property from working.
Ms. Sacha Aurora (7 months ago)
I paid for a course on udemy, and still had to come find a better tutorial on youtube. I don't know if it's the pace, or maybe I'm addicted to learning from you instead. Whatever the reason, I like your CSS tutorials way better.
Abdul Roshan (8 months ago)
Nice tuts.,. thanks...
Ashenefech Ye Eyesus (9 months ago)
Very nice one Thank you!
Ben Sufiany (10 months ago)
Easy way
Michael Puodziukas (10 months ago)
Thank you for the video and excellent explanation!
Kalamata Info (10 months ago)
You should be a lecture, have been hearing people teaching CSS, HTML but you do it the best. Thanks a lot
Claudia Canedo (11 months ago)
Great teaching style! Clear and simple explanations! Best CSS video I have found so far. Thanks a lot really :)
Gad Yariv (11 months ago)
thank you for the great Tutorial I have got only one question...what are purple and pink? maybe I'm asking this question too early on...the only colors I know are Red Green and Blue...RGB. can you be inputting the color information in RGB? R-255 G-192 B-203 instead of pink
Justin LaTour (1 year ago)
Paragraphs are changing but h1 and h2 are not. What could be causing this.
Rubi June (1 year ago)
seriously thank you for making these videos!! currently in an online intro webpage design class (I have no prior knowledge) and I was struggling in her class until I found your pageeeeeeee your a wonderful teacher :3
MeRoOz_ (1 year ago)
Man iam arabian and i left all arabian tutorials to watch you!! but here is a notice : Download ''Atom'' because its a great program to deal with programming or a program called brackets !! i just wanted to help :)
why do you mix the html with css? industry standard to separate them yea?
EJ Media (1 year ago)
In episode 10 I talk about the stylesheet
Mab Ped (1 year ago)
This is very nice sir i almost understand everything your videos are so cool and can you do Photoshop more tutorial please im learning photoshop css html programmer and im 11 yeras old too
can you make a video on product category slider
Nikola Draskovic (1 year ago)
Youre using notepad and IE, it kind a bothers me
Uwais (1 year ago)
Thanks a lot for explaining everything in easy way. i really appreciate your tutorials
SJCPanda (1 year ago)
you give the best tutorials on youtube! thank you
Athenkosi Monakali (1 year ago)
You should be a lecture, have been hearing people teaching CSS, HTML but you do it the best. Thanks a lot
Jayar Mandani (2 years ago)
Thanks for the tutorials.
Pika 10 (2 years ago)
Nice Videos! :)
tensol promotional (2 years ago)
nice one
Paul Garcia (3 years ago)
what if you want to add two different style to a <h1> and a <p>? (using separate css document) For example lets say I have two <h1> tags in the homepage how do i make one <h1> tag blue and the other <h1> tag green Same for the <p> tag lets say i have multiple <p> tags and i want one <p> tag to be red and the other <p> tag to be black how can i do this? And does this follow up with multiple pages or just the home page lets say i want to make the <h1> tag on the homepage blue and the <h1> tag on the info section green how can i accomplish this? same for the <p>
Paul Garcia (3 years ago)
Ok, thank you
EJ Media (3 years ago)
+Paul Garcia You could give each h1 and p tag it's own unique ID which I discuss later on. CSS can work across multiple pages if you want or you can make a CSS stylesheet for each page - it depends on how you want it.
CoffeeDatFurryBoii (3 years ago)
how do you change the background color?
CoffeeDatFurryBoii (3 years ago)
EJ Media (3 years ago)
+Randomizer ATC I will talk about this later on the series - but you can set a background color in the body selector
Kangeman Maipmokiuah (3 years ago)
the best teacher ,,  really learning important thing here
coral mary (3 years ago)
Hey.... Thanks alot very well explained... I hv got a problem, unfortunately my laptop is been spoiled... Can you tell me a text editor that i can use for smartphone plz till i get my laptop fixed....
coral mary (3 years ago)
+EJ Media i got 920 text editor. It seems to be good one.
EJ Media (3 years ago)
+Marjan Do a google search on the keywords TEXT EDITOR LITE and you will find several for your particular smartphone
Dineth Nimantha (3 years ago)
BracedSalmon UD (3 years ago)
I really appreciate your well-explained videos thank you very much !
cL Saviour (9 months ago)
BracedSalmon UD I
EJ Media (3 years ago)
+Vitt Volt Glad to be of help
SoulBaron (3 years ago)
I like how you make sure we understand when explaining
EJ Media (3 years ago)
+SoulBaron Thanks much - if there is one thing to learn out there its CSS

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.