# Documentation Find nodes from the HTML with a CSS selector: ```js u('ul#demo li') u(document.getElementById('demo')) u(document.getElementsByClassName('demo')) u([ document.getElementById('demo') ]) u( u('ul li') ) u('') u('li', context) ``` ### Parameters The first parameter can be: - A text CSS selector - A single HTML Node. This is specially useful in events where you can just pass `this` - A NodeList or other similar objects that can be converted to an array - An array of nodes* - Another Umbrella instance - An HTML fragment as a string - Nothing The second parameter is only for the CSS selector, which indicates a portion of the DOM where the selector is applied. For example, with `u('li', u('ul').first())` it will find all of the `li` from the first `ul`. \* actually it can be an array of anything you want as in `["a", "b"]`, however this is not officially supported and might change at any moment > You *should* use `u('#demo')` instead of `u(document.getElementById('demo'))`, internally it's optimized to do this in a fast way. That was only an example of what's possible. ### Return An instance of Umbrella JS so you can chain it to any of the other methods. ### Examples Select all of the list elements that are children of `ul` ```js var lis = u('ul > li'); // Same as u('ul').children('li'); ``` Find all of the headers from the page to create a Table of Contents: ```js var headers = u('h1, h2, h3, h4, h5, h6'); ``` Generate a link on the fly: ```js var link = u('').addClass('main').attr({ href: '/hello' }); ``` You can use this to generate many kind of elements on the fly. For example, for a simple grocery list (using ES6 for simplicity): ```js var fruits = ['apple', 'strawberry', 'pear', 'banana']; var list = u('