English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Complete CSS Selector Reference Manual
Select all <p> elements and <h1>Elements, demonstration of the use of multiple element selectors:
<!DOCTYPE html> <html> <title>Basic Tutorial Website (oldtoolbag.com)</title> <head> <style> h1,p { background-color:red; color:white; } </style> </head> <body> <h1>Welcome to Basic Tutorial Website (www.oldtoolbag.com)</h1> <p>The URL of our website is: www.oldtoolbag.com.</p> <p>The name of our website is: Basic Tutorial Website.</p> <p>We provide you with various basic tutorials to learn. Learn the basics well, and you can go further! </p> </body> </html>Test and see ‹/›
Several elements have the same style, separated by commas between each element name, for example: h1,h2,h3,p{...}
IEFirefoxOperaChromeSafari
All mainstream browsers support element,elementMultiple Element Selectors.
Complete CSS Selector Reference Manual