Professional Documents
Culture Documents
• เพื่อให้นิสิตเข้าใจภาษา CSS
• เพื่อให้นิสิตสามารถพัฒนาเว็บไซต์ด้วย CSS
แบบฝึกปฎิบัติการ
1. จงแสดงผลลัพธ์จากโค้ด HTML ต่อไปนี้โดยให้นสิ ิตก็อปหน้าจอผลลัพธ์ลงในช่องแสดงผลลัพธ์ พร้อมตอบคาถาม
โค้ดโปรแกรม
ผลลัพธ์
ผลลัพธ์
จงทาให้โค้ดโปรแกรมสมบูรณ์
……<!DOCTYPE html> …………….
<html>
<head>
<link href="…… style.css ……" rel="…tylesheet….. ">
</head>
…</body>…...
<h1>หลักสูตรวิทยาศาสตรบัณฑิต (สาขาวิชาวิทยาการคอมพิวเตอร์) หลักสูตรเก่า พ.ศ. 2559 (COVID-19)………..
<p>88620359 ฐานข้อมูลไม่สัมพันธ์ 3 (2-2-5)</p>
<p>88620459 วิทยาศาสตร์ข้อมูลเบื้องต้นและการวิเคราะห์ข้อมูล 3 (3-0-6)</p>
<p>88621159 โครงสร้างข้อมูลและอัลกอริทึม 3 (2-3-4)</p>
<p>88622259 ระบบปฏิบัติการ 3 (3-0-6) </p>
</body>
………<html>……..
User Interface Design and Development ปฏิบตั ิการที่ 9 CSS EP1
โค้ดโปรแกรม
<!DOCTYPE html>
<html>
<head>
<link href="../code/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<form>
<div class="mx-auto" style="width: 1200px;">
<span class="input-group-text">@</span>
<input type="text" class="form-control" placeholder="Server" aria-label="Server">
</div>
<div class="input-group">
<span class="input-group-text">With textarea</span>
<textarea class="form-control" aria-label="With textarea"></textarea>
</div>
</div>
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
border: 2px solid black;
User Interface Design and Development ปฏิบตั ิการที่ 9 CSS EP1
height: 70px;
}
table.center {
margin-left: auto;
margin-right: auto;
}
h1 {
font-size: 40px;
color:rgb(65, 141, 14);
}
#search {
width: 10em; height: 2em;
}
.button {
height: 30px;
width: 100px;
background-color: #4CAF50;
border: none;
color: white;
}
</style>
</head>
<body>
<form name="login01" action="#" >
<table class="center">
<tr>
<th style="width:500px" colspan="2"><h1>LOGIN FORM</h1></th>
</tr>
<tr>
<td style="width:120px">Email:</td>
<td style="width:200px">
<input type="text" class="form-control" id="email" placeholder="Email" name="email" size="40"
style="height:30px;">
</td>
</tr>
<br>
<tr>
<td>Password:</td>
<td > <br>
<input type="password" class="form-control" id="pwd" placeholder="Password" name="pass"
size="40"
style="height:30px;">
</td>
User Interface Design and Development ปฏิบตั ิการที่ 9 CSS EP1
</tr>
<tr>
<td></td>
<td><br><br><button type="submit" class="button">Submit</button><br>
</td>
</tr>
</table>
</form>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
border: 2px solid black;
height: 50px;
width:800px;
margin:100px auto;
}
table.center {
margin-left: auto;
margin-right: auto;
}
User Interface Design and Development ปฏิบตั ิการที่ 9 CSS EP1
.button {
height: 40px;
width: 150px;
background-color: #ade4a2;
border: none;
color: rgb(15, 15, 15);
}
#t01 th {
background-color: rgb(82, 231, 36);
color: rgb(10, 10, 10);
.border {
border: 1px solid #080808;
}
.noborders td {
border:0;
}
</style>
</head>
<body>
<form name="logout01" action="/logout" method = "POST" >
<table class="center" id="t01">
<tbody class="border">
<tr>
<th style="width:500px;" colspan="2">หน้าจอสมาชิก</th>
</tr>
<tr class="noborders">
<td>ชื่อ-สกุล :</td>
<td>Login วัน-เวลาล่าสุด :</td>
</tr>
<tr class="noborders">
<td>รหัสสมาชิก :</td>
<td>Logout วัน-เวลาล่าสุด :</td>
</tr>
<tr class="noborders">
<td>ตาแหน่ง :</td>
<td>จานวนครั้งที่เข้าสู่ระบบ (ครั้ง) :</td>
User Interface Design and Development ปฏิบตั ิการที่ 9 CSS EP1
</tr>
<tr class="noborders">
<td>เงินเดือน (บาท):</td>
<td></td>
</tr>
<tr class="noborders">
<td>ยอดขายทั้งหมด (บาท):</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>