width & height ត្រូវបានគេយកទៅប្រើប្រាស់សំរាប់កំណត់ទទឹងនិងកំពង់របស់ element ទាំងឡាយ។
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Width & Height</title>
<style>
div {
height: 200px;
width: 50%;
background-color: powderblue;
}
</style>
</head>
<body>
Set the height and width of an element
This div element has a height of 200px and a width of 50%:
</body>
</html>
Set the height and width of an element
This div element has a height of 200px and a width of 50%:
max-width property ត្រូវបានគេប្រើប្រាស់សំរាប់កំណត់ទទឹងជាអតិបរិមារបស់ element ទាំងឡាយ។
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Width & Height</title>
<style>
div {
max-width: 500px;
height: 100px;
background-color: powderblue;
}
</style>
</head>
<body>
Set the max-width of an element
This div element has a height of 100px and a max-width of 500px:
Resize the browser window to see the effect.
</body>
</html>
Set the max-width of an element
This div element has a height of 100px and a max-width of 500px:
Resize the browser window to see the effect.














