본문 바로가기

프로그래밍/HTML5

선택옵션,다중선택옵션,textarea

<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <title>입력양식 태그</title>
   </head>
   <body>
      <form>
         <lable for="username">아이디</lable>
         <input id="username" type="text"/><br />
         <lable for="pwd">비밀번호</lable>
         <input id="pwd" type="password"/><br />
         <lable for="pwd">비밀번호 재확인</lable>
         <input id="pwd" type="password"/><br />
         성별
         <lable for="man">남자</lable>
         <input id="man" type="radio" checked name="gender"/>
         <lable for="woman">여자</lable>
         <input id="woman" type="radio" name="gender"/><br />
         <select>
            <option>남자</option>
            <option>여자</option>
         </select><br />
         생년월일<br />
         <select>
            <option label="1980년대" />
            <option>1986</option>
            <option>1987</option>
            <option>1988</option>
            <option>1989</option>
            <option label="1990년대" />
            <option>1990</option>
            <option>1991</option>
            <option>1992</option>
            <option>1993</option>
            <option>1994</option>
            <option>1995</option>
            <option>1996</option>
            <option>1997</option>
            <option>1998</option>
            <option>1999</option>
            <option label="2000년대" />
            <option>2000</option>
            <option>2001</option>
            <option>2002</option>
            <option>2003</option>
            <option>2004</option>
            <option>2005</option>
            <option>2006</option>
            <option>2007</option>
            <option>2008</option>
            <option>2009</option>
            <option label="2010년대" />
            <option>2010</option>
            <option>2011</option>
            <option>2012</option>
            <option>2013</option>
            <option>2014</option>
            <option>2015</option>
         </select>
         <select>
            <option>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
            <option>6</option>
            <option>7</option>
            <option>8</option>
            <option>9</option>
            <option>10</option>
            <option>11</option>
            <option>12</option>
         </select>
         <select>
            <option>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
            <option>6</option>
            <option>7</option>
            <option>8</option>
            <option>9</option>
            <option>10</option>
            <option>11</option>
            <option>12</option>
            <option>13</option>
            <option>14</option>
            <option>15</option>
            <option>16</option>
            <option>17</option>
            <option>18</option>
            <option>19</option>
            <option>20</option>
            <option>21</option>
            <option>22</option>
            <option>23</option>
            <option>24</option>
            <option>25</option>
            <option>26</option>
            <option>27</option>
            <option>28</option>
            <option>29</option>
            <option>30</option>
            <option>31</option>
         </select><br />
         multiple 다중 선택 가능<br />
         <select id="select" multiple size=3>
            <option>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
            <option>6</option>
            <option>7</option>
            <option>8</option>
            <option>9</option>
         </select><br />
         textarea 크기를 조절할 수 있다.<br />
         <textarea rows=10 cols=50>
         테스트 중입니다 rows는 글씨를 쓸 수 있는 줄이고 cols는 한줄에 들어갈 개수를 정하는 겁니다.(영문 기준)안녕하세요aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
         </textarea><br />
         이용약관<br />
         <textarea rows=10 cols=50>
         </textarea><br />
         <lable for="box1">동의합니다</lable>
         <input id="box1" type="checkbox" name="gender"/>
         <lable for="box2">동의하지 않습니다</lable>
         <input id="box2" type="checkbox" name="gender"/><br />
         <input type="submit" value="가입" />
         <input type="reset" value="초기화" /><br />
      </form>
   </body>
</html>

선택옵션

 

option label="2010년대"  <- 각 년대를 구분시킬수 있다.

select안에 option을 넣어서 표시할수 있다.

 

다중선택옵션

 

multiple을 넣어주고 ctrl + 마우스클릭을 하면 다중선택이 가능하다.

size는 보여주는 칸?수를 의미한다.

 

textarea

 

 

 

rows는 입력할때 보여주는 줄수

cols는 영문기준으로 한줄에 들어갈수 있는 글자수

'프로그래밍 > HTML5' 카테고리의 다른 글

선택자 태그  (0) 2017.09.20
css전체 선택자 태그  (0) 2017.09.20
입력 양식 태그  (0) 2017.09.20
비디오태그  (0) 2017.09.20
오디오태그  (0) 2017.09.20