Select all elements, and set their background color to yellow via universal selector - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:Universal selector

Description

Select all elements, and set their background color to yellow via universal selector

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
* {<!-- w  w  w  .  ja  va 2 s  .co  m-->
    background-color: yellow;
}
</style>
</head>
<body>

<h1>Welcome to My Homepage</h1>

<div class="intro">
  <p id="myId">this is a test.</p>
  <p id="myElement">this is a paragraph.</p>
</div>

<p>I <b>like</b> css.</p>

</body>
</html>

Related Tutorials