소스


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <style>
        body{
            margin: 0px;
            padding: 10px;
        }
        #logo{
            width: auto;
            height: 80px;
        }
        #main{
            width: 100%;
            height: auto;
        }
        #page1{
            width: 80%;
            margin: auto;
        }
        #content,#aside{
            display: inline-block;
            padding: 0px;
            border-width: 0px;
            margin: 0px;
        }
        #content{
            margin: 5px;
            width: 80%;
        }
        #aside{
            width: 8%;
        }
        ul{
            padding: 0px;
            width: 500px;
            margin: auto;
        }
        li{
            display: inline-block;
            width: 100px;
            background-color: azure;
            margin: 10px;
        }
        #menu{
            background-color: cornsilk;
        }
        a{
            display: inline-block;
            width: 100px;
            height: 30px;
            text-align: center;
            text-decoration: none;
            color: black;
        }
        a:hover{
            background-color: cornflowerblue;
            color: white;
        }
    </style>
</head>
<body>
  <div id="page1">
       <div id="header">
           <img id="logo" alt="" src="googlelogo.png" />
       </div>
       <div id="menu">
           <ul>
               <li><a href="#">menu1</a></li>
               <li><a href="#">menu2</a></li>
               <li><a href="#">menu3</a></li>
               <li><a href="#">menu4</a></li>
           </ul>
       </div>
       <div>
           <div id="content">
               <img id="main" alt="" src="jung.png"/>
           </div>
            <div id="aside">
               광고란
           </div>
       </div>
       <div id="footer">
           오픈 API | 이용약관 | 개인정보취급방침 | 청소년보호정책 | 권리침해신고 | 고객센터 | E-mail수집거부정책
           <br/> Copyright © Kakao Corp. All rights reserved.
        </div>
   </div>
</body>
</html>
cs


결과



*참고 , 이미지파일은 같은 폴더 내에 가지고 있으면 된다.


* 이미지 불러오기 : <img src=주소" width="가로길이" heigth="높이" border="테두리 굵기" align="위치">

* 링크로 이동하기 : <a href="위치" name="이름"></a>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
    <head>
      <title>이동 예제</title>
    </head>
    <!--가져오기-->
    <body>
      <a href = "#down" name="top">down</a></hl>
      <img src="http://img.naver.net/static/www/u/2013/0731/nmms_224940510.gif" width="138" heigth="110" border="10" align="left">
      <h1>목차</h1>
      <p><a href="#point">여기</a>로 이동</p>
      
      <p>
       오후는 html언어에<br>대한 기본문법 계속입니다
      </p>
      
      <p>
       a태그는
       <a href="http://naver.com">네이버</a><br>
       
       1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>
       1<br>1<br>1<br>1<br>1<br><a name="point">여기</a><br>1<br>1<br>1<br>1<br>1<br>1<br>
        <a href = "#top" name = "down">top</a>
      </p>
      
    </body>
</html>
cs



'* Programming > HTML&CSS' 카테고리의 다른 글

[HTML]Form(input, select, checkbox, radio)  (0) 2016.09.06
[HTML]table만들기  (0) 2016.09.06
[HTML]특수문자 엔티티(' < ',' > ',' " ',' " ')  (0) 2016.09.06
[HTML]글자 폰트  (0) 2016.09.06
[HTML]제목 / 주석 / 타이틀바  (0) 2016.09.06

+ Recent posts