CSS3 > Selectors

Element in CSS3

How to select similar type of element on the page in CSS3?


Element selector is used to select similar type of element on the page.

<style>
        li {
            border: 1px solid #c0c0c0;
        }
</style>

<body>
        <div>This is Div</div>
        <br />
        <ol>
            <li>This is Ordered List</li>
            <li>ITFunda</li>
            <li>DotNetFunda</li>
            <li>TechFunda</li>
        </ol>
        <br />
        <p>This is Paragraph</p>
        <br />
        <ul>
            <li>This is Unordered List</li>
            <li>ITFunda</li>
            <li>TechFunda</li>
            <li>DotNetFunda</li>
        </ul>
    </body>

In the above code snippet we can notice that the style is given only to the content inside the <li> tag.

OUTPUT

 Views: 3814 | Post Order: 3



Write for us






Hosting Recommendations