:empty
In this chapter you will learn:
Description
The :empty
selector matches elements with no children.
Example
<!DOCTYPE HTML> <!-- j ava 2 s. co m-->
<html>
<head>
<style type="text/css">
:empty {
border: thin black solid;
padding: 4px;
}
</style>
</head>
<body>
<a href="http://java2s.com">Visit the java2s.com</a>
<a href="http://w3c.org">Visit the W3C website</a>
</body>
</html>
Next chapter...
What you will learn in the next chapter:
Home » HTML CSS Tutorial » CSS Selector Reference