Element Selector ("element")

Selects all elements with the given tag name.


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.

span {
  width: 60px;
  height: 60px;
  float: left;
  padding: 10px;
  margin: 10px;
  background-color: #eee;
$("div").css("border", "9px solid red");

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 :)