본문 바로가기

HTML/HTML 기초

[HTML] 링크삽입 태그 (<a> 태그)

<a href="링크 삽입할 주소" title="링크 제목" target="윈도우 창을 어떻게 할 것인지">

target : _blank(새 창), _self(현재 창)

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login</title>
</head>
<body>
    <h3>Log In</h3>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : </b><input type="text"><br>
    <b>PASSWORD : </b><input type="text"><br><br>
    <input type="button" value="Login">
    <input type="reset" value="Rewrite">
</body>
</html>

(&nbsp; : 공백)

그리고 실제 페이지를 만들어본다


login.html

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login</title>
</head>
<body>
    <h3>Log In</h3>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : </b><input type="text"><br>
    <b>PASSWORD : </b><input type="text"><br><br>
    <input type="button" value="Login">
    <input type="reset" value="Rewrite">
</body>
</html>


join.html

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Join</title>
</head>
<body>
    <h3>Log In</h3>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : </b><input type="text"><br>
    <b>PASSWORD : </b><input type="text"><br>
    <b>&nbsp;N A M E&nbsp;&nbsp;&nbsp; : </b><input type="text"><br>
    <b>&nbsp;P H O N E&nbsp; : </b><input type="text" size="8">-<input type="text" size="8">-<input type="text" size="8"><br>
    <b>&nbsp;&nbsp;E M A I L&nbsp; : </b><input type="text" size="8">@<input type="text"><br><br>

    <input type="button" value="Join">
    <input type="reset" value="Rewrite">
</body>
</html>


메인페이지에서 각각의 링크를 누르면 해당 페이지로 이동하는걸 볼 수 있다.

728x90
반응형