[HTML/CSS 공부] HTML 기본 태그로 글 작성해보기

헤븐리뷰·2023년 5월 20일
0

HTML/CSS 공부 기록

목록 보기
1/11
  1. <p> 태그: paragraph의 약자
  • 본문은 <p></p> 안에 적어야 함
  1. <h1> 태그: heading의 약자
  • h1~h6? 까지 있음
  • 글 제목은 <h1></h1> 안에 적어야 함
  1. 이미지: <img src=""> 이렇게 적어야 함

  2. 버튼: <button>버튼 이름</button>

  3. 링크: <a href="https://naver.com">링크</a>

  4. 리스트: <ul><li>리스트</li></ul>

  • ul: unordered list
  • li: list item
  • ol: ordered list
  1. 모든 요소는 태그 안에 넣는다.

  2. 일부 태그는 속성 기입 가능

  • img, a 태그
  1. 태그 안에 태그도 가끔 가능
  • 이미지를 누르면 네이버로 이동하게 만들 수 있음


(로컬호스트로 실행한 나의 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>
</head>
<body>
    <h1>철치</h1>
    <p>안녕하세요</p>
    <img src="이미지경로" alt="이미지">
    <button>버튼</button>
    <a href="https://naver.com">링크</a>

    <ul>
        <li>item 1</li>
        <li>item 2</li>
    </ul>

</body>
</html>
profile
데이터로 세상을 쓰고 읽고 싶은 헤븐리뷰입니다.

0개의 댓글