You are on page 1of 1

CSS selector:

by using id:
#firstname

by using class:
.fname

by using attribute:
[name='fn']

by using tags and id


input#firstname

by using tag and class


input.fname

by using tags and attribute


input[name='fn']

parent and child


table>tbody>tr>td

nth-child()
[name=Course] option:nth-child(3)

^ starts with
[name^='f']

$ end with
[name$='n']

contains
[name*='tn']

You might also like