> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/getters-and-setters/get-content-and-attributes.md).

# Get Content and Attributes

Jscula contains powerful methods for changing and manipulating HTML elements and attributes.

***

### Jscula DOM Manipulation

One very important part of Jscula is the possibility to manipulate the DOM.

Jscula comes with a bunch of DOM related methods that make it easy to access and manipulate elements and attributes.

DOM = Document Object Model The DOM defines a standard for accessing HTML and XML documents: *"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."*

***

### Get Content - text(), html(), and val()

Three simple, but useful, Jscula methods for DOM manipulation are:

* `text()` - Sets or returns the text content of selected elements

```sniper.js
$('#button').text();
```

* `html()` - Sets or returns the content of selected elements (including HTML markup)

```sniper.js
$('#div').html();
```

* `val()` - Sets or returns the value of form fields

```sniper.js
$('#firstname').val();
```

***

### Get Attributes - getAttribute()

your regular method for getting elements attributes

```javascript
$('#myInput').getAttribute('type');
```

### Click here [attr()](broken://pages/7db57935dc1041118f3d2afb641aef84c181df2c) to see a full document on Jscula attribute
