HTML Document Standars

김민재·2021년 6월 29일
0

Gotcha HTML/CSS!

목록 보기
2/13
  • !DOCTYPE html 선언은 항상 HTML 파일의 첫 번째 코드 행이어야 합니다.
    이를 통해 브라우저는 예상되는 HTML 버전을 알 수 있습니다.
  • html 요소에는 모든 HTML 코드가 포함됩니다.
  • 제목과 같은 웹 페이지에 대한 정보는 페이지의 head 태그 안에 있습니다.
  • head 태그 안쪽의 title 요소를 사용하여 웹 페이지에 제목을 추가할 수 있습니다. 웹 페이지 제목은 브라우저 탭에 나타납니다.
  • a 태그는 동일한 페이지의 내부 페이지, 외부 페이지 또는 컨텐츠에 연결하는 데 사용됩니다.
  • 웹 페이지에 섹션을 생성하고 a 태그를 사용하여 해당 섹션으로 건너뛰고 건너뛸 요소에 ID 속성을 추가할 수 있습니다.
  • HTML 요소 사이의 공백은 브라우저에 요소가 표시되는 방식을 변경하지 않으면서 코드를 읽기 쉽게 만드는 데 도움이 됩니다.
  • 들여쓰기는 코드를 더 쉽게 읽을 수 있도록 도와줍니다.
    부모-자식 관계를 볼 수 있게 해줍니다.
  • 주석이 HTML로 작성되는 구문은 < !--comment -- >입니다.
<!DOCTYPE html>
<html>
<head>
  <title>Brown Bears</title>
</head>
<body>
  <nav>
    <a href="./index.html">Brown Bear</a>
    <a href="./aboutme.html">About Me</a>
  </nav>
  <h1>The Brown Bear</h1>
  <nav>
    <ul>
      <li><a href="#introduction">Introduction</a></li>
      <li><a href="#habitat">Habitat</a></li>
      <li><a href="#media">Media</a></li>
    </ul>
  </nav>
  <div id="introduction">
    <h2>About Brown Bears</h2>
    <p>The brown bear (<em>Ursus arctos</em>) is native to parts of northern Eurasia and North America. Its conservation status is currently <strong>Least Concern</strong>.<br /><br /> There are many subspecies within the brown bear species, including the
      Atlas bear and the Himalayan brown bear.</p>
    <a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank">Learn More</a>
    <h3>Species</h3>
    <ul>
      <li>Arctos</li>
      <li>Collarus</li>
      <li>Horribilis</li>
      <li>Nelsoni (extinct)</li>
    </ul>
    <h3>Features</h3>
    <p>Brown bears are not always completely brown. Some can be reddish or yellowish. They have very large, curved claws and huge paws. Male brown bears are often 30% larger than female brown bears. They can range from 5 feet to 9 feet from head to toe.</p>
  </div>
  <div id="habitat">
    <h2>Habitat</h2>
    <h3>Countries with Large Brown Bear Populations</h3>
    <ol>
      <li>Russia</li>
      <li>United States</li>
      <li>Canada</li>
    </ol>
    <h3>Countries with Small Brown Bear Populations</h3>
    <p>Some countries with smaller brown bear populations include Armenia, Belarus, Bulgaria, China, Finland, France, Greece, India, Japan, Nepal, Poland, Romania, Slovenia, Turkmenistan, and Uzbekistan.</p>
  </div>
  <div id="media">
    <h2>Media</h2>
    <img src="https://content.codecademy.com/courses/web-101/web101-image_brownbear.jpg" />
    <video src="https://content.codecademy.com/courses/freelance-1/unit-1/lesson-2/htmlcss1-vid_brown-bear.mp4" height="240" width="320" controls>Video not supported</video>
  </div>
</body>
</html>

profile
자기 신뢰의 힘을 믿고 실천하는 개발자가 되고자합니다.

0개의 댓글