Source Code:
(back to article)
Submit
Result:
Report an issue
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
⌄
⌄
⌄
⌄
<!DOCTYPE html>
<
html
>
<
head
>
<
title
>Заголовок документа</
title
>
<
style
>
p
:
nth-of-type
(
3
) {
background:
#8ebf42
;
}
</
style
>
</
head
>
<
body
>
<
h2
>Пример селектора :nth-of-type()</
h2
>
<
p
>Параграф 1</
p
>
<
p
>Параграф 2</
p
>
<
p
>Параграф 3</
p
>
</
body
>
</
html
>
<!DOCTYPE html> <html> <head> <title>Заголовок документа</title> <style> p:nth-of-type(3) { background: #8ebf42; } </style> </head> <body> <h2>Пример селектора :nth-of-type()</h2> <p>Параграф 1</p> <p>Параграф 2</p> <p>Параграф 3</p> </body> </html>