Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the selectors in HTML

Shulou Source: shulou.com Published: 2022-06-03 15:10:40 11月14日 Update

This article mainly introduces what the selector in HTML has, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

The function of selector

Various styles and attributes of html can be manipulated more conveniently and quickly in the stylesheet.

classification

1. Label Type Selector: style labels

A {text-decoration: none;}

2. Include selector

Span [class=demo] {color:red;}

3. Contains selector inside

P a {text-decoration: underline; font-size: 30px; color:#ff00ff;}

4. Sub-object selector

Body > p {font-size:34px;}

5. Id selector

# content {border-style: solid;}

6. Class selector

.note {font-size: 34px;} span.note1 {font-size: 54px;}

7. Packet selector

Td,p,a {} Thank you for reading this article carefully. I hope the article "what are the selectors in HTML" shared by the editor will be helpful to you? at the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!

Tags: Select article style label convenience value function interest at the same time object attribute more friend knowledge type ribbon industry table information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Redmi OPPO Reno Microsoft