본문 바로가기
하지의 코딩일지/STUDY MEMO[FRONTEND]

개발 일지 1일차 HTML

by 하지마지 2023. 6. 5.
728x90

기초수업 

브라우저 역할이란? 

내 컴퓨터에서 서버 컴퓨터로 정보를 요청할 때 그것을 가져와 그대로 보여주기만 하는 역할.

즉, 서버에 요청하면 css, java, html을 가져다 줌.

 

HTML 뼈대

CSS 꾸미기

Javascript 움직이기

 

<div> 문단 나누기

<h1> 문서의 제목 나타내기

<span> 특정글자를 감쌀 때

<button> 버튼

 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>스파르타코딩클럽 | HTML 기초</title>
</head>

<body>
    <!-- 구역을 나누는 태그들 -->
    <div>나는 구역을 나누죠</div>
    <p>나는 문단이에요</p>
    <ul>
        <li> bullet point!1 </li>
        <li> bullet point!2 </li>
    </ul>

    <!-- 구역 내 콘텐츠 태그들 -->
    <h1>h1은 제목을 나타내는 태그입니다. 페이지마다 하나씩 꼭 써주는 게 좋아요. 그래야 구글 검색이 잘 되거든요.</h1>
    <h2>h2는 소제목입니다.</h2>
    <h3>h3~h6도 각자의 역할이 있죠. 비중은 작지만..</h3>
    <hr>
    span 태그입니다: 특정 <span style="color:red">글자</span>를 꾸밀 때 써요
    <hr>
    a 태그입니다: <a href="http://naver.com/"> 하이퍼링크 </a>
    <hr>
    <hr>
    input 태그입니다: <input type="text" />
    <hr>
    button 태그입니다: <button> 버튼입니다</button>
    <hr>
    textarea 태그입니다: <textarea>나는 무엇일까요?</textarea>
</body>

</html>
 
결과

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .mytitle {
            color : red; //폰트 색상 변경
            font-size: 40px; // 폰트사이즈 변경 
        }
        .mybtn {
            font-size: 12px;
            color : white;
            background-color: green; //버튼 색상 변경 
        }
    </style>
</head>
<body>
    <h1 class="mytitle">로그인 페이지</h1>
    <p>ID : <input type="text"></p>
    <p>PW : <input type="text"></p>
    <button class="mybtn">로그인하기</button>  //버튼 주석안에 class를 입력함으로써 head 에서 css 가능해짐
</body>
</html>
 
결과

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       
        @import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&display=swap'); //글자바꾸기 
        *{
            font-family: 'Black Han Sans', sans-serif;  //-*이 들어가면 전체를 의미
        }
        .mytitle2 {
            background-color: green;

            width: 300px;
            height: 200px;

            border-radius: 10px;
            color: white;

            text-align: center;
            padding-top: 30px;   //안쪽 상자 키우기

            background-position: center;
            background-size: cover;

        }
        .mybtn2 {
            margin: 20px 20px 20px 20px;   //바깥 여백 공간주기
        }
        .wrap {
           
            width: 300px;
            margin: 20px auto 0px auto;
        }
    </style>
</head>
<body>
   <div class="wrap">
    <div class="mytitle2">
            <h1>로그인 페이지</h1>
            <h5>아이디, 비밀번호를 입력하세요</h5>
        </div>
        <p>ID : <input type="text"></p>
        <p>PW : <input type="text"></p>
        <button class="mybtn2">로그인하기</button>
   
   </div>
   
</body>
</html>

결과

 

728x90

'하지의 코딩일지 > STUDY MEMO[FRONTEND]' 카테고리의 다른 글

코딩 일지 6일차  (0) 2023.06.12
코딩일지 5일차 HTML  (0) 2023.06.10
코딩일지 4일차 HTML  (1) 2023.06.09
코딩 일지 3일차  (0) 2023.06.08
하지의 코딩일지 2일차 html css  (1) 2023.06.06