-
Book Overview & Buying
-
Table Of Contents
Web Developer's Reference Guide
By :
As the name suggests, selector attributes are used to select various elements of HTML. The selector attributes basically support the CSS selectors.
Selectors begin with a $ sign followed by parentheses: $()
Element selectors select elements using their name. For example, if a paragraph is written in the tags <p>, you can select this paragraph using its name, that is, p:
$("p")The name of the element to be chosen is passed as a parameter.
The element selectors returns the element.
The element selectors select elements using their name. For example, if a paragraph is written in the tags <p>, you can select this paragraph using its name.
ID selectors select elements using their ID. Each element of the HTML can have its own identifying ID and it can be accessed using #. For example, to access the element with the ID text, we can use the following syntax:
$("#text")The pound sign (or number...
Change the font size
Change margin width
Change background colour