> 
> **Possible Duplicate:**  
> 
> [.prop() vs .attr()](https://stackoverflow.com/questions/5874652/prop-vs-attr) 
> 
> 
> 

Given the new [`.prop()`](http://api.jquery.com/.prop/) method in jQuery, which is the preferred way to *create* a new element with particular fields, e.g. a link:

1. `$('<a>').prop('href', '...');`
2. `$('<a>').attr('href', '...');`
3. `$('<a href="...">');`

I've always tended to use #2, but it's unclear whether a *new* element being put in the DOM shouldn't now use #1 instead.