본문 바로가기

웹 표준 사이트 만들기/페이지 구조 실습

페이지 구조 실습 - 헤더 타이틀 & 웹 폰트

반응형
SMALL

헤더 타이틀 주석표시 후 h1 입력 후 Tab

 

 

 

자동 완성

 

 

입력

 

 

 

에러난 & 을 & 로 입력

 

 

 

보기 (입력한 헤더 타이틀이 보임)

 

 

 

 

style.css 이동 후 text align center 입력

 

 

 

 

text align center 입력 후 보기 (아무 변화 없음)

 

 

 

 

header-tit h1 만들고 text-align center 복붙

 

 

 

 

 

h1에 text-align center 복붙 후 보기 (헤더 타이틀 이름이 가운데 옴)

 

 

 

 

색상, 사이즈 입력

 

 

색상, 사이즈 입력 후 보기 (하늘색 블럭이 보임)

 

 

 

 

 

display inline 입력

 

 

 

 

 

display inline 입력 후 보기

 

 

 

 

 

text-align 입력. h1 지우고 tit 에 입력

 

 

 

 

 

text-align 입력. h1 지우고 tit 에 입력 후 보기

 

 

 

 

padding, color 입력

 

 

 

 

padding, color 입력 후 보기

 

 

 

 

margin top 입력

 

 

 

 

 

margin top 입력 후 보기 (그대로 임)

 

 

 

변화된 게 없는 이유가 display를 inline 으로 입력했기 때문

 

 

 

 

inline-block 으로 수정

 

 

 

 

 

inline-block 으로 수정 후 보기 (간격이 넓어짐)

 

 

 

 

 

reset.css 폰트 초기화 입력

 

 

 

 

 

goolge font 이동

https://fonts.google.com/

 

Google Fonts

Making the web more beautiful, fast, and open through great typography

fonts.google.com

 

 

 

Nanum Gothic 선택

 

 

 

 

Regular 400 선택

 

 

 

 

View selected families 선택

 

 

 

 

 

Ctrl + C

 

 

 

 

 

index.html 이동 후 웹 폰트 주석표시 후 폰트링크 Ctrl + V

 

 

 

 

Ctrl + C

 

 

 

reset.css 에 Ctrl + V

 

 

 

 

style.css 에서 font-weight, text-transform 입력

 

 

 

 

 

폰트 입력 후 보기 (나눔고딕으로 바뀜)

 

 

 

 

 

입력

 

 

 

 

보기

 

 

 

 

index.html 에서 입력

 

 

 

 

 

 

입력 후 보기 (인라인이라 이렇게 나옴)

 

 

 

 

 

style.css 에서 입력 (블럭화)

 

 

 

 

블럭화 시켰기 때문에 아래로 이동한 것

 

 

 

 

입력

 

 

 

 

입력 후 보기

 

 

 

 

inline-block 으로 입력

 

 

 

 

 

입력 후 보기

 

 

 

 

 

index.html 에서 야매 br 입력

 

 

 

 

 

style.css에서 mt-5 입력 후 Tab

 

 

 

 

 

margin-top -5px 입력

 

 

 

 

 

 

칸이 살짝 올라갔음

 

 

 

 

 

 

완성

 

 

index.html
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="author" content="codegogo">
    <meta name="description" content="웹 표준을 준수한 사이트 예제입니다.">
    <meta name="keywords" content="코드고고, 웹표준, 웹접근성, 사이트 만들기">
    <meta name="generator" content="brakets">
    <title>WEBSTANDARD SITE</title>
    
    <!-- CSS STYLE -->
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" href="css/style.css">
    
    <!-- 웹 폰트 -->
    <link href="https://fonts.googleapis.com/css2?family=Nanum+Gothic&display=swap" rel="stylesheet">
</head>
<body>
    <!-- 스킵 내비게이션 -->
    <div id="skip">
        <a href="cont_nav">전체 메뉴 바로가기</a>
        <a href="cont_ban">배너 영역 바로가기</a>
        <a href="cont_cont">컨텐츠 영역 바로가기</a>
    </div>
    <!-- //스킵 내비게이션 -->
   
    <div id="wrap">
        <div id="header">
            <div class="container">
                <div class="header">
                    <div class="header-menu">
                        <a href="https://codegogo.tistory.com/">Desinger</a>
                        <a href="https://www.inflearn.com/course/%EC%9B%B9-%ED%91%9C%EC%A4%80-%EC%82%AC%EC%9D%B4%ED%8A%B8-%EB%A7%8C%EB%93%A4%EA%B8%B0">Publisher</a>
                        <a href="https://www.youtube.com/">Youtube</a>
                    </div>
                    <!-- //헤더 메뉴 -->
                    <div class="header-tit">
                        <h1>Professional Publisher &amp; Designer</h1><br>
                        <a href="http://codegogo.dothome.co.kr/web">codegogo.dothome.co.kr/web</a>
                    </div>
                    <!-- //헤더 타이틀 -->
                    <div class="header-icon"></div>
                </div>
            </div>
        </div>
        <!-- //header -->
        
        <div id="contents">
            <div id="cont_nav">
                <div class="container">contents</div>
            </div>
            <!-- //cont_nav -->
            <div id="cont_tit">
                <div class="container">cont_tit</div>
            </div>
            <!-- //cont_tit -->
            <div id="cont_ban">
                <div class="container">cont_ban</div>
            </div>
            <!-- //cont_ban -->
            <div id="cont_cont">
                <div class="container">cont_cont</div>
            </div>
            <!-- //cont_cont -->
        </div>
        <div id="footer">
            <div class="container">footer</div>
        </div>
        <!-- //footer -->
    </div>
    <!-- //wrap -->
</body>
</html>
style.css
@charset "utf-8";

/* 스킵 내비게이션 */
#skip {position: absolute;}
#skip a {position: absolute; left: 0px; top: -35px; border: 1px solid #fff; color: #fff; background: #333; line-height: 30px; width: 160px; text-align: center;}
#skip a:active,
#skip a:focus {top: 0;}

/* 레이아웃 */
#wrap {width: 100%;}
#header {width: 100%; height: 325px; background: url(../img/header_bg.jpg) center top repeat-x }
#contents {width: 100%;height: 800px; background: #222;}
#footer {width: 100%; height: 200px; background: #333;}

/* 컨텐츠 레이아웃 */
#cont_nav {width: 100%; height: 200px; background: #333;}
#cont_tit {width: 100%; height: 200px; background: #444;}
#cont_ban {width: 100%; height: 200px; background: #555;}
#cont_cont {width: 100%; height: 200px; background: #666;}

/* 컨테이너 */
.container {width: 990px; margin: 0 auto; height: inherit; /* background: rgba(255,255,255,0.3);*/}

/* 헤더 */
.header { }
.header .header-menu {text-align: right;}
.header .header-menu a {color: #fff; padding: 10px 0px 10px 13px; display: inline-block;}
.header .header-menu a:hover {color: #666;}
.header .header-tit {text-align: center;}
.header .header-tit h1 {background-color: #4aa8d4; font-size: 28px; padding: 5px 20px 6px 20px; display: inline-block; color: #fff; margin-top: 40px; font-weight: normal; text-transform: uppercase;}
.header .header-tit a { display: inline-block; background-color: #2698cd; font-size: 18px; color: #fff; padding: 5px 20px 6px 20px; margin-top: -5px;}

.header .header-icon {}
reset.css
@charset "utf-8";

/* 여백 초기화 */
body,div,ul,li,dl,dd,dt,ol,h1,h2,h3,h4,h5,h6,input,fieldset,
legend,p,select,table,th,td,tr,textarea,button,form{margin:0;padding:0;}

/* a 링크 초기화 */
a {color: #222; text-decoration: none;}
a:hover {color: #390;}

/* 폰트 초기화 */
body, input, textarea, select, button, table {
    font-family:'Nanum Gothic', AppleSDGothicNeo-Regular,'Malgun Gothic','맑은 고딕',dotum,'돋움',sans-serif; color: #222; font-size: 13px; line-height: 1.5;}

 

 

https://inf.run/fyGS

https://inf.run/fyGS

반응형
LIST