این ترجمه ناقص است. لطفاً در ترجمه این مقاله از انگلیسی کمک کنید.

انتخابگر نوع با نوع عنصر انتخاب می‌کند. به عبارت دیگر این انتخابگر به وسیله نوع عنصر، تمام عنصرهای تطابق داده شده را انتخاب می‌کند.

/* را انتخاب می‌کند <a> همه عنصرهای */
a {
  color: red;
}

Syntax

element { style properties }

Example

CSS

span {
  background-color: skyblue;
}

HTML

<span>Here's a span with some text.</span>
<p>Here's a p with some text.</p>
<span>Here's a span with more text.</span>

Result

Specifications

Specification Status Comment
Selectors Level 4
The definition of 'Type (tag name) selector' in that specification.
Working Draft No changes
Selectors Level 3
The definition of 'type selectors' in that specification.
Recommendation No changes
CSS Level 2 (Revision 1)
The definition of 'type selectors' in that specification.
Recommendation  
CSS Level 1
The definition of 'type selectors' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
Namespaces (ns|elementName)Chrome Full support YesEdge Full support YesFirefox Full support 1IE Full support 9Opera Full support 8Safari Full support 1.3WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

Document Tags and Contributors

Contributors to this page: dijam
Last updated by: dijam,