[TIL] 2021-08-03

Minji Kim·2021년 8월 3일
0

TIL

목록 보기
5/5
post-thumbnail

table 갖고놀기

소스 코드

<!DOCTYPE html>
<html lang="ko">
<html>
<head>
<meta charset=utf-8>
<title>table 연습</title>
<style>
table {
	border-collapse: collapse;
}

td {
	border: 1px solid;
	width: 120px;
	height: 40px;
}

.mon td {
	border: 7px solid;
	width: 0px;
	height: 0px;
}
</style>
</head>
<body>
	<table>
		<tr>
			<td rowspan="3"></td>
			<td colspan="3"></td>
		</tr>
		<tr>
			<td colspan="3"></td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td></td>
		</tr>
	</table>
	<br>
	<table>
		<tr>
			<td rowspan="3"></td>
			<td colspan="3"></td>
		</tr>
		<tr>
			<td colspan="2"></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td></td>
		</tr>
	</table>
	<br>
	<table>
		<tr>
			<td></td>
			<td colspan="2" rowspan="2"></td>
			<td rowspan="3"></td>
		</tr>
		<tr>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td></td>
		</tr>
	</table>

	<br>

	<table class="mon">
		<tr>
			<td colspan="4" rowspan="4" style="width:240px; height:120px; background: #f65b46;"></td>
			<td colspan="2" rowspan="2" style="width:120px; height:30px; background: #fcec60;"></td>
		</tr>
		
		<tr>
		</tr>
		
		<tr>
			<td rowspan="2" style="width:60px; height:30px;"></td>
			<td rowspan="2" style="width:60px; height:120px;"></td>
		</tr>
		
		<tr>
		</tr>
		
		<tr>
			<td colspan="2" rowspan="2" style="width:70px; height:120px; background: black;"></td>
			<td colspan="2" style="width:60px; height:30px;"></td>
			<td colspan="2" style="width:60px; height:30px;"></td>
		</tr>
		
		<tr>
			<td colspan="2" style="width:60px; height:30px;"></td>
			<td colspan="2" style="background: #202e5b;"></td>
		</tr>
	</table>
</body>
</html>

실행 결과


form 태그

서버를 만들지 않았을 때도 form 태그에서 값을 넘겨주는 걸 할 수 있다.
https://www.w3schools.com/action_page.php 페이지를 action 값으로 설정하면 된다.

소스코드

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>Form</title>
</head>
<body>
	<form action="https://www.w3schools.com/action_page.php">
		First name:<br> <input type="text" name="firstname" value="미키"> <br>
		Last name:<br> <input type="text" name="lastname" value="마우스"> <br>
		<input type="submit">
	</form>
</body>
</html>

실행 결과

처음 html을 연습할 때 사용하기 좋을 것 같다.

profile
블로그 이전 mimah.tistory.com

0개의 댓글