My desire to delve into the world of jQuery has ignited. From my perspective, jQuery simply selects the desired element and performs actions on it. However, I find the selection process closely resembling CSS selectors, a realm with which I am not well-versed. I have always perceived CSS selectors as disorganized and lacking in rules.
My knowledge of CSS selectors is limited to just a few basics:
#id
.class
This leads me to question if there are any specific rules when using CSS/jQuery selectors?
UPDATE:
I am seeking an explanation that will clarify this statement for me:
In CSS 2.1, style is typically assigned based on the element's position within the document tree. While this method works for many situations, some scenarios may be restricted due to the document structure. For example, in HTML 4, no element specifically targets the first line of a paragraph, resulting in a limitation where a simple CSS selector cannot pinpoint it.
The introduction of "Pseudo-elements and pseudo-classes" appears to address this issue, but how exactly should I interpret "no element refers to the first line of a paragraph, and therefore no simple CSS selector may refer to it"?