개발자로 가는길 :: 'HTML' 태그의 글 목록
반응형

HTML에 해당하는 글
반응형
6

HTML, CSS 연습문제

개발/웹개발|2023. 4. 26. 16:32
728x90
반응형

Udemy 인강 과제 (100day of web development)

주어진 이미지

원본이미지

내가 만든 결과물

색상도 컬러피커 사용해서 똑같이 맞춰 볼까 했는데 눈대중으로 픽해서 그냥 진행 했다.

 

HTML 코드

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>HTML&CSS Basic</title>
    <!-- 구글 웹폰트 가져오기 -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap" rel="stylesheet">
    <!-- style.css 가져오기 -->
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <!-- 헤더영역 -->
    <header>
      <h1>HTML & CSS Basics Summary</h1>
      <img src="./data/logo.png" alt="HTML5 and CSS3 logo image" />
    </header>
    <!-- 메인 영역 -->
    <main>
      <h2>HTML Summary</h2>
      <p>
        HTML(HyperText Markup Language) is used to define our page content,
        structure and meaning. You <span class="bolder">don't</span> use it for styling purposes. Use CSS
        for that instead
      </p>
      <ul id="html-list">
        <li class="yellow">HTML uses "elements" to describe(annotate) content</li>
        <li>
          HTML emements typically have an opening tag, content and then a
          closing tag
        </li>
        <li class="yellow">You can also have void(empty) elements ike images</li>
        <li class="yellow">You can also configure elements with attributes</li>
        <li>
          There's a long list of available elements but you'll gain experience
          over time, no worries.
        </li>
      </ul>
      <p>
        learn more about all available HTML elements on
        <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">
          the MDN HTML element reference.
        </a>
      </p>
      <h2>CSS Summary</h2>
      <p>CSS (Cascading Style Sheet) is used for styling your page content.
        <ul>
            <li>Styles are assigned via property-value pairs</li>
            <li>You can assign styles via the "style" attribute</li>
            <li class="yellow">
                To avoid code duplication, you typically use global styles(e.g via the "style" element) 
                instead 
            </li>
            <li>Alternatively, you can work with external stylesheet files which you "lin"k to</li>
            <li class="yellow">
                When working with CSSm concepts like "inheritance", "specificity" and the "box model" 
                should be understood.
            </li>
        </ul>
        <p>Learn more about all available CSS properties and values on <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference">the MDN CSS property reference</a></p>
      </p>
    </main>
    <!-- 푸터 영역 -->
    <footer>
        <a href="./data/html-css-basics-summary.pdf" target="_blank" >Download PDF Summary</a>
        <p>(c)BaeTab</p>
    </footer>
  </body>
</html>

CSS코드

body {
  /* 배경 색상 */
  background-color: rgb(244, 234, 255);
  /* 폰트 지정 */
  font-family: "Roboto", "sans-serif";
}

h1 {
  font-size: 50px;
  color: rgb(88, 49, 196);
}

/* 헤더영역  */
header {
  text-align: center;
  padding: 30px;
}

/* 이미지 사이즈 조정 */
header img {
  width: 300px;
}

/* 메인영역 */
main {
  background-color: rgb(132, 64, 204);
  padding: 30px;
  /* 가운데 정렬하기 위해 수평마진 auto */
  margin: 30px auto;
  width: 700px;
  /* 모서리 둥글게 */
  border-radius: 10px;
  color: rgb(248, 241, 255);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
li {
  margin: 14px 0;
  padding-left: 10px;
  border-left: 5px solid transparent;
}

a {
  text-decoration: none;
  color: rgb(36, 3, 102);
  background-color: rgb(255, 237, 177);
  border-radius: 5px;
  padding: 2px 6px;
}

a:hover,
a:active {
  background-color: rgb(247, 201, 39);
}

.yellow {
  color: rgb(255, 255, 0);
  border-color: yellow;
}

span {
  font-weight: bold;
}

footer {
  text-align: center;
}

footer a {
  font-weight: 500;
  padding: 10px 15px;
  background-color: rgb(247, 201, 39);
  color: black;
  border-radius: 10px;
}
footer a:hover,
footer a:active {
  background-color: rgb(255, 186, 58);
}

footer p {
  color: rgb(131, 113, 149);
  margin-top: 30px;
}

 

아직 선택자를 위한 아이디나 클래스등을 깔끔하게 적지 못하는 것 같다.

연습 열심히 해야겠다

728x90
반응형

'개발 > 웹개발' 카테고리의 다른 글

무료 폰트 추천 ( feat . 티몬 )  (0) 2023.05.13
Javascript 기본 설명  (0) 2023.04.07
CSS (list style)  (0) 2023.04.04
CSS 기본 ( text 관련 )  (0) 2023.04.03
HTML ( form - <select> <option> 드롭다운 목록작성)  (0) 2023.03.31

댓글()

CSS (list style)

개발/웹개발|2023. 4. 4. 09:52
728x90
반응형
<!-- 목록 스타일 -->
    <!-- 순서없는 목록 : disc(기본) , circle(빈원) , square(네모) , none(없음)-->
    <!-- 순서있는 목록 : decimal(기본) , lower , upper 알파벳 등등 -->
.a {
        list-style-type: disc;
      }
      .b {
        list-style-type: circle;
      }
      .c {
        list-style-type: square;
      }
      .d {
        list-style-type: none;
      }

.a {
        list-style-type: disc;
      }
      .b {
        list-style-type: circle;
      }
      .c {
        list-style-type: square;
      }
      .d {
        list-style-type: none;
      }

728x90
반응형

'개발 > 웹개발' 카테고리의 다른 글

HTML, CSS 연습문제  (0) 2023.04.26
Javascript 기본 설명  (0) 2023.04.07
CSS 기본 ( text 관련 )  (0) 2023.04.03
HTML ( form - <select> <option> 드롭다운 목록작성)  (0) 2023.03.31
HTML 연습문제 (input 이용)  (0) 2023.03.31

댓글()

HTML ( form - <select> <option> 드롭다운 목록작성)

개발/웹개발|2023. 3. 31. 16:59
728x90
반응형
 <!--
        <select> , <option> : 드롭다운 목록 작성
     -->
    <form action="" method="get">
      <label for="">과일선택</label>
      <select name="" id="">
        <option value="포도">포도</option>
        <option value="사과">사과</option>
        <option value="자두">자두</option>
        <option value="딸기">딸기</option>
        <option value="수박">수박</option>
      </select>
    </form>

 

728x90
반응형

'개발 > 웹개발' 카테고리의 다른 글

CSS (list style)  (0) 2023.04.04
CSS 기본 ( text 관련 )  (0) 2023.04.03
HTML 연습문제 (input 이용)  (0) 2023.03.31
HTML (input type 에 들어올 수 있는 유형)  (0) 2023.03.31
HTML ( form 태그(사용자 입력) )  (0) 2023.03.31

댓글()

HTML 연습문제 (input 이용)

개발/웹개발|2023. 3. 31. 16:15
728x90
반응형
<!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>상품주문서</title>
  </head>
  <body>
    <h1>상품 주문서</h1>
    <form>
      <fieldset>
        <legend>
          <h3>개인 정보</h3>
        </legend>
        <div>
          <label for="">이름</label>
          <input
            type="text"
            name="name"
            id=""
            placeholder="여백없이 입력"
            required
          />
        </div>
        <div>
          <label for="">연락처</label>
          <input
            type="tel"
            name="tel"
            id=""
            placeholder="연락가능한 번호"
            pattern="[0-9]{3}-[0-9]{4}-[0-9]{4}"
          />
        </div>
      </fieldset>
    </form>
    <form>
      <fieldset>
        <legend><h3>배송지 정보</h3></legend>
        <div>
          <label for="">주소</label>
          <input type="text" name="address" id="" />
        </div>
        <div>
          <label for="">전화번호</label>
          <input
            type="tel"
            name="tel2"
            id=""
            pattern="[0-9]{3}-[0-9]{4}-[0-9]{4}"
          />
        </div>
      </fieldset>
    </form>
    <form action="">
      주문 정보
      <fieldset>
        <legend><h3>주문 정보</h3></legend>
        <div>
          <input type="checkbox" name="product" id="" value="0" />과테말라
          안티구아(100g) <input type="number" name="num1" id="" />
        </div>
        <div>
          <input type="checkbox" name="product" id="" value="0" />인도네시아
          만델링(100g) <input type="number" name="num2" id="" />
        </div>
        <input
          type="checkbox"
          name="product"
          id=""
          value="0"
        />탐라는도다(블렌딩)(100g) <input type="number" name="num3" id="" />
      </fieldset>
    </form>
    <form>
      <input type="submit" value="주문하기" />
      <input type="reset" value="취소하기" />
    </form>
  </body>
</html>

728x90
반응형

댓글()

HTML 기본 태그

개발/웹개발|2023. 3. 30. 17:07
728x90
반응형
<!--
        제목: <hn> 태그 (n은 1~6 의미 )
        단락: <p>
        줄바꿈: <br>
        수평 줄: <hr>
        인용문: <blockquote>
        입력하는 그대로 화면 표시 : <pre>
        강조 : <strong> , <b>
        이탤릭 : <em> , <i>
        줄바꿈 없이 영역 묶기 : <span>
        아래 첨자 : <sub>
        윗 첨자 : <sup>
        밑줄 : <u>
    -->
<h1>제목</h1>
    <h2>제목</h2>
    <h3>제목</h3>
    <h4>제목</h4>
    <h5>제목</h5>
    <h6>제목</h6>

<h1> -> <h6> 순서

<hr> <!-- 수평선 -->
    <p>
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque fuga ipsum voluptas est laudantium illo rem eum eveniet minima repudiandae eos, quisquam quibusdam accusantium itaque magnam et, aut labore sed?
    </p>

수평선 + 단락

lorem  = dummy text (예비 컨텐츠) 의미없는 단어나열이지만 페이지를 설계하며 필요할때 사용

lorem100 등 뒤에 숫자 붙여서 좀더 길게 만들수있음.

 

<hr> <br> 은 닫는 태그가 없다

 

<pre> <!-- 입력한 그대로 화면에 표시해 줌-->
        아주 먼 옛날 바닷가 어느 왕국에

        애나벨리라는 이름을 가진

        한 소녀가 살고 있었다.
</pre>

 

최근엔
    <strong> 디지털 세상 </strong>
    을 살아가기 위한 기본 상식으로 코딩 교육이 시행되고 있다.

<strong>으로 강조 (굵게)

<strong> 과 <b> 의 차이

strong : 강조(경고,주의사항)의 의미

b : 그냥 폰트 굵게

일반적으로 보는데는 같지만 , 스크린리더등을 사용했을때 중요함

 

<p><i>이탤릭체로 표시할 텍스트</i></p>
    <p><em>이탤릭체로 표시할 텍스트</em></p>

<i> = 단순 이탤릭체 , <em> = 강조형 이탤릭체 

 

<p>E = mc<sup>2</sup></p>
    <p>물의 화학식은 <b>H<sub>2</sub>o</b></p>
    <p>링크 표시 용도가 아니라 단순히 밑줄 긑는다면 <u>u</u>태그</p>

<!--
        <ul> : 순서 없는 목록 만들기
        <ol> : 순서 있는 목록 만들기  속성 추가 가능 <!-- type : 1, A, a, I , i-->
        <li> : 아이템 표현  
    -->

 

 
<ul>
      <li>일반전화 : (국번없이)1330</li>
      <li>휴대전화 : 064-1330</li>
    </ul>

    <ol>
      <li>일반전화 : (국번없이)1330</li>
      <li>휴대전화 : 064-1330</li>
    </ol>

<h1>abc.com</h1>
    <h2>Main menu</h2>
    <ul>
      <li>about us</li>
      <li>services</li>
      <li>location</li>
      <li>
        partners
        <ul>
          <li>naver</li>
          <li>daum</li>
        </ul>
      </li>
    </ul>

실습

<!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>HTML</title>
  </head>
  <h1>HTML - 실습</h1>
  <h2>수습 기자 모집</h2>
  <h3>언론에 관심있는 새내기 여러분 모집합니다.</h3>
  <p>
    학내 언론사에서 신입생을 대상으로 공채 수습기자를 모집합니다. 학부나 전공에
    상관없이 평소 학생 기자에 관심 있었던 여러 학우들의 지원 바랍니다.
  </p>
  <h4>모집분야</h4>
  <ul>
    <li>아나운서(0명):학내 소식을 라디오 방송으로 보도</li>
    <li>프로듀서(0명):라디오 방송 기획, 제작</li>
    <li>엔지니어(0명):라디오 방송 녹음 및 편집</li>
  </ul>
  <h4>혜택</h4>
  <ol type="a">
    <li>수습기자 활동 중 소정의 활동비 지급</li>
    <li>정기자로 진급하면 장학금 지급</li>
  </ol>
  <body></body>
</html>

 

<!--
        설명 목록 만들기 : <dl> , <dt>, <db>
     -->
    <h1>제주 올레</h1>
    <dl>
      <dt>올레 1 코스</dt>
      <dd>코스 : 시흥 초등학교 옆 ~ 광치기 해변</dd>
      <dd>거리 : 14.6km(4~5시간)</dd>
      <dd>난이도 : 중</dd>
      <dt>올레 2 코스</dt>
      <dd>코스 : 광치기 해변 ~ 온평 포구</dd>
      <dd>거리 : 14.5km(4~5시간)</dd>
      <dd>난이도 : 중</dd>
    </dl>

 

728x90
반응형

댓글()

HTML 문서 기본 구조.

개발/웹개발|2023. 3. 21. 21:38
728x90
반응형

<!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>
</head>

<body>

</body>

</html>

vscode 기준 !  tab 한번 누르면 자동완성

 

<!DOCTYPE html> 최신html 을 사용함을 나타냄

<title></title> 탭 제목

<h1><h2> ....... 제목 크기

<p> </p> 단락

<ol> <li>문자</li> </ol>  , <ul><li>문자</li></ul>  어떤게 점찍는거고 숫자쓰는건지 기억안나는데 목록 만드는거

<a href = " url " > 링크 </a>

<img src = "이미지주소"  alt = "사진설명">

<-- 주석 -->

 

vscode 에서는 Liveserver 라는 확장으로 실시간으로 결과물 볼수있음

 

728x90
반응형

댓글()