style 에 많이 사용
/* <a> elements with an href containing "example" */ a[style*="color: blue"] { font-size: 2em; }
/* Internal links, beginning with "#" */ a[href^="#"] { background-color: gold; }
/* <a> elements with a title attribute */ a[title] { color: purple; } /* <a> elements with an href matching "https://example.org" */ a[href="https://example.org"] { color: green; } /* <a> elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a> elements whose class attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; }
Attribute selectors - CSS: Cascading Style Sheets | MDN
The CSS attribute selector matches elements based on the presence or value of a given attribute. Represents elements with an attribute name of attr. Represents elements with an attribute name of attr whose value is exactly value. Represents elements with an attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value.
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors


Seonglae Cho