[HTML5] 3 HTML Text Tag? ์†Œ๊ฐœ-IMBETPY

Doomchit_3ยท2020๋…„ 7์›” 7์ผ
0

2 HTML

๋ชฉ๋ก ๋ณด๊ธฐ
3/7
post-thumbnail

๐ŸŽซ ์ œ๋ชฉ (Headings) ํƒœ๊ทธ

  • Headingํƒœ๊ทธ ๋Š” ์ œ๋ชฉ์„ ๋‚˜ํƒ€๋‚ผ ๋•Œ ์‚ฌ์šฉํ•˜๋ฉฐ h1์—์„œ h6๊นŒ์ง€์˜ ํƒœ๊ทธ๊ฐ€ ์žˆ๋‹ค.
  • h1 ํƒœ๊ทธ๋Š” ๊ฐ€์žฅ ํฌ๊ธฐ๊ฐ€ ํฌ๋ฉฐ, ์ œ๋ชฉ์„ ๋‚˜ํƒ€๋‚ธ๋‹ค.
  • ๊ฒ€์ƒ‰์—”์ง„์€ ์ œ๋ชฉ ํƒœ๊ทธ๋ฅผ ์ค‘์š”ํ•œ ์˜๋ฏธ๋กœ ๋ฐ›์•„๋“ค์ผ ๊ฐ€๋Šฅ์„ฑ์ด ํฌ๋‹ค.
<!DOCTYPE html>
<html>
  <body>
    <h1>heading 1</h1>
    <h2>heading 2</h2>
    <h3>heading 3</h3>
    <h4>heading 4</h4>
    <h5>heading 5</h5>
    <h6>heading 6</h6>
  </body>
</html>


๐Ÿ€„ ๊ธ€์ž ํ˜•ํƒœ (Text Formatting) ํƒœ๊ทธ

โ‘  b

  • bold์ฒด๋ฅผ ์ง€์ • ํ•œ๋‹ค.
  • ์ œ๋ชฉ ํƒœ๊ทธ์™€ ๊ฐ™์ด ์˜๋ฏธ๋ก ์ (Semantic) ์ค‘์š”์„ฑ์˜ ์˜๋ฏธ๋Š” ์—†๋‹ค.
    <b>bold.</b>

โ‘ก strong

  • b tag์™€ ๋™์ผํ•˜๊ฒŒ bold์ฒด๋ฅผ ์ง€์ • ํ•œ๋‹ค.
  • ์˜๋ฏธ๋ก ์ (Semantic) ์ค‘์š”์„ฑ์˜ ์˜๋ฏธ๋ฅผ ๊ฐ–๋Š”๋‹ค.
  • ํ‘œํ˜„๋˜๋Š” ์™ธ์–‘์€ b tag์™€ ๋™์ผํ•˜์ง€๋งŒ ์›นํ‘œ์ค€์„ ์ค€์ˆ˜ํ•˜๊ณ ์ž ํ•œ๋‹ค๋ฉด strong๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ๋ฐ”๋žŒ์งํ•˜๋‹ค.
    <strong>strong.</strong>
    

โ‘ข i

  • Italic์ฒด๋ฅผ ์ง€์ • ํ•œ๋‹ค.
  • ์˜๋ฏธ๋ก ์ (Semantic) ์ค‘์š”์„ฑ์˜ ์˜๋ฏธ๋Š” ์—†๋‹ค.
    <i>italic.</i>

โ‘ฃ em

  • emphasized(๊ฐ•์กฐ, ์ค‘์š”ํ•œ) text๋ฅผ ์ง€์ • ํ•œ๋‹ค.
  • i tag์™€ ๋™์ผํ•˜๊ฒŒ Italic์ฒด๋กœ ํ‘œํ˜„๋œ๋‹ค.
  • ์˜๋ฏธ๋ก ์ (Semantic) ์ค‘์š”์„ฑ์˜ ์˜๋ฏธ๋ฅผ ๊ฐ–๋Š”๋‹ค.
    <em>emphasized.</em>

โ‘ค small

  • small text๋ฅผ ์ง€์ • ํ•œ๋‹ค.
    <h2>HTML <small>Small</small> Formatting</h2>

โ‘ฅ mark

  • highlighted text๋ฅผ ์ง€์ •ํ•œ๋‹ค.
    <h2>HTML <mark>Marked</mark> Formatting</h2>

โ‘ฆ del

  • deleted (removed) text๋ฅผ ์ง€์ •ํ•œ๋‹ค.
    <p>My name is <del>junyeong</del> hello.</p>

โ‘ง ins

  • inserted (added) text๋ฅผ ์ง€์ • ํ•œ๋‹ค.
    <p>My my <ins>name</ins> is junyeong.</p>

โ‘จ sub / sup

  • sub ํƒœ๊ทธ๋Š” subscripted(์•„๋ž˜์— ์“ฐ์ธ) text๋ฅผ
  • sup ํƒœ๊ทธ๋Š” superscripted(์œ„์— ์“ฐ์ธ) text๋ฅผ ์ง€์ •ํ•œ๋‹ค.
  <p>hello<sub>my</sub> world.</p>
  <p>hello<sup>my</sup> world.</p>


๐Ÿฎ ๋ณธ๋ฌธ ํƒœ๊ทธ

โ‘  p

  • ๋‹จ๋ฝ (Paragraphs)์„ ์ง€์ •ํ•œ๋‹ค.
    <p>1๋‹จ๋ฝ.</p>
    <p>2๋‹จ๋ฝ.</p>

โ‘ก br

  • ๊ฐ•์ œ๊ฐœํ–‰์„ ์ง€์ • ํ•œ๋‹ค.
  • br tag๋Š” ๋นˆ ์š”์†Œ(empty element)๋กœ ์ข…๋ฃŒํƒœ๊ทธ๊ฐ€ ์—†๋‹ค.
    <p>hello<br>a<br>boy</p>
  • HTML์—์„œ๋Š” 1๊ฐœ ์ด์ƒ์˜ ์—ฐ์†๋œ ๊ณต๋ฐฑ(space)์„ ์‚ฝ์ž…ํ•˜์—ฌ๋„ 1๊ฐœ์˜ ๊ณต๋ฐฑ์œผ๋กœ ํ‘œ์‹œ๋œ๋‹ค.
  • 1๊ฐœ ์ด์ƒ์˜ ์—ฐ์†๋œ ์ค„๋ฐ”๊ฟˆ(enter)๋„ 1๊ฐœ์˜ ๊ณต๋ฐฑ์œผ๋กœ ํ‘œ์‹œ๋œ๋‹ค.
  • ์—ฐ์†์  ๊ณต๋ฐฑ์„ ์‚ฝ์ž…ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ &nbsp; ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
    <p>This is&nbsp; a para&nbsp; &nbsp; graph</p>

โ‘ข pre

  • ํ˜•์‹ํ™”๋œ(preformatted) text๋ฅผ ์ง€์ •ํ•œ๋‹ค. (์ฝ”๋“œ๋ฅผ ์‚ฝ์ž…ํ•  ๋•Œ ๋งŽ์ด ์‚ฌ์šฉ)
  • pre ํƒœ๊ทธ ๋‚ด์˜ content๋Š” ์ž‘์„ฑ๋œ ๊ทธ๋Œ€๋กœ ๋ธŒ๋ผ์šฐ์ €์— ํ‘œ์‹œ๋œ๋‹ค.
<pre>
var myArray = [];
console.log(myArray.length); // 0

myArray[1000] = true;  // [ , , ... , , true ]

console.log(myArray.length); // 1001
console.log(myArray[0]);     // undefined
    </pre>

โ‘ฃ hr

  • ์ˆ˜ํ‰์ค„์„ ์‚ฝ์ž…ํ•œ๋‹ค.
    <hr>

โ‘ค q

  • ์งง์€ ์ธ์šฉ๋ฌธ(quotation)์„ ์ง€์ •ํ•œ๋‹ค.
  • ๋ธŒ๋ผ์šฐ์ €๋Š” ์ธ์šฉ๋ถ€ํ˜ธ(ํฐ๋”ฐ์˜ดํ‘œ/quotation marks)๋กœ q ์š”์†Œ๋ฅผ ๊ฐ์‹ผ๋‹ค.
    <p> Well done is better than well said. (Benjamin Franklin) </q></p>

โ‘ฅ blockquote

  • ๊ธด ์ธ์šฉ๋ฌธ ๋ธ”๋ก์„ ์ง€์ •ํ•œ๋‹ค.
  • ๋ธŒ๋ผ์šฐ์ €๋Š” blockquote ์š”์†Œ๋ฅผ ๋“ค์—ฌ์“ฐ๊ธฐํ•œ๋‹ค.
  • css๋ฅผ ์ด์šฉํ•˜์—ฌ ๋‹ค์–‘ํ•œ style์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
<blockquote>
      <p>It is the working man who is the happy man. It is the idle man who is the miserable man. (Benjamin Franklin) </p>
    </blockquote>


์ฐธ๊ณ ๐Ÿ“š

mozilla
poiemaweb

profile
Walk it like I talk it x 3 ___#SoftwareEngineer

0๊ฐœ์˜ ๋Œ“๊ธ€