I saw last post similar to my question HTML5 canvas style height vs attribute height
But in that post, there was no clear information regarding which one will work and what is the difference?
I tried following example:
<html>
<head>
</head>
<body>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script src="jquery-1.11.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script src="script.js"></script>
<div>
<select style="width: 200px" width="200px">
<option value="Test1"> Test1 </option>
<option value="Test2"> Test2 </option>
<option value="Test3"> Test3</option>
<option value="Test4"> Test4 </option>
<option value="Test5"> Test5 </option>
</select>
</div>
</body>
</html>
But in above example, if put either style="width: 200px" or width="200px", same result is not seen.
Question:
1) why are style="width: 200px and width="200px not giving same result?
2) what is the difference between width="200px" or width="200"?
Can some help me to clear these basics?