<div id="id1">
<p><input value="<input>"></p>
<p><input type="text" value='<input type="text">'></p>
<p><textarea><textarea></textarea></p>
</div>
<script>
$( "#id1 input:text" ).css( "border", "2px red dashed" );
</script>
<div id="id2">
<p><input value="<input>"></p>
<p><input type="text" value='<input type="text">'></p>
<p><textarea><textarea></textarea></p>
</div>
<script>
$( "#id2 input[type='text']" ).css( "border", "2px blue dashed" );
</script>
<div id="id3">
<p><input value="<input>"></p>
<p><input type="text" value='<input type="text">'></p>
<p><textarea><textarea></textarea></p>
</div>
<script>
$( "#id3 *" ).filter( "input:text, textarea" ).css( "border", "2px red dashed" );
</script>