CSS Class and ID, The Difference Between ID and Class
The difference between ID and a Class selector is that an ID selector can be used to identify one element, but, class selector can be used to identify more than one element.
In the CSS, Class selector starts with "." followed by the selector name, and the selector ID starts with "#" followed by the selector name
The Difference Between ID and Class - example
Syntax : selector { property: value }
Example 1:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
Users replays
0 results
- Add your answer -