<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<style type="text/css">
#parent{width:200px;height:200px;border:2px solid red;}
</style>
</head>
<body>
<div id="parent">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
<script type="text/javascript">
var div=document.getElementById('parent').getElementsByTagName('div');
for(var i in div) {
div[i].style.color='#ff0000';
div[i].style.border='1px solid #000000';
div[i].style.width='20px';
div[i].style.height='20px';
}
</script>
</body>
</html>