Selecting All Elements
The universal selector(*) matches every element in the document.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
<style type="text/css">
* {
border: thin black solid;
padding: 4px;
}
</style>
</head>
<body>
<a href="http://java2s.com">Visit the java2s.com</a>
<p>I like <span>HTML</span> and CSS.</p>
</body>
</html>
Home
HTML CSS Book
CSS
HTML CSS Book
CSS
Selectors:
- Selecting All Elements
- Selecting Elements by Type
- Selecting Elements by Class
- Selecting Elements by ID
- Selecting Elements by Attribute
Related: