Element Selector ("element")

Selects all elements with the given tag name.

.element(element)

element StringAn element to search for. Refers to the tagName of DOM nodes.

JavaScript's getElementsByTagName() function is called to return the appropriate elements when this expression is used.

Finds every DIV element.

JS
<div>DIV1</div>
<div>DIV2</div>
<span>SPAN</span>
CSS
div,
span {
  width: 60px;
  height: 60px;
  float: left;
  padding: 10px;
  margin: 10px;
  background-color: #eee;
}
HTML
$("div").css("border", "9px solid red");
DEMO

Looking for a Web Developer?

👋

Hi! I'm Basti, author of this site. If you are looking for a web developer with 15+ years of experience, holla at me!

Be it the good 'ol jQuery, vanilla JS or modern frameworks like Vue and Svelte, front- or backend, I can help you.

Just write me at jobs@jqapi.com :)