๐Ÿฅ ์ƒํ™œ์ฝ”๋”ฉ 1,2 HTML & CSS

Dayยท2022๋…„ 2์›” 8์ผ
0
post-thumbnail
post-custom-banner

HTML

(Hyper Text Markup Language)

์ด 150๊ฐœ ์ •๋„์˜ ํƒœ๊ทธ๋ฅผ ๊ฐ€์ง„๋‹ค.

	<strong>
	<u>
	<h1>~<h6>
	<br> -> ๊ทธ๋ƒฅ ์ค„๋ฐ”๊ฟˆ์ด๋ผ ๊ฐ์Œ€ ํ•„์š” x
	<p>
	

'์ •๋ณด'๊ฐ€ ์žˆ๋Š” ์ฝ”๋”ฉ์ด ์ค‘์š”ํ•˜๋‹ค.`

ํƒœ๊ทธ

ํ•œ๊ตญ์–ด

<meta charset = "utf-8">

์ด๋ฏธ์ง€ ์‚ฝ์ž…

<img src = "coding.jpg" width = "450">

๊ธฐ๋ณธํƒœ๊ทธ

<ul> (unordered list) [๋ถ€๋ชจ] <-> <ol> (ordered list)

<li> ๋ฆฌ์ŠคํŠธ, ํ•ญ๋ชฉํƒœ๊ทธ [์ž์‹]

[๋ถ€๋ชจ] , [์ž์‹] ํƒœ๊ทธ๋Š” ๋ฐ˜๋“œ์‹œ ๊ฐ™์ด ์กด์žฌ

<body> ๋ณธ๋ฌธ

<head> ๋ณธ๋ฌธ ์„ค๋ช…ํ•˜๋Š” ํƒœ๊ทธ

<html> ์ตœ์ƒ์œ„ํƒœ๊ทธ

์ œ์ผ ์œ„ <!doctype html>

ํ•˜์ดํผ๋งํฌ <a href = "   ">

๋™์˜์ƒ ์‚ฝ์ž… <iframe> </iframe>

CSS

HTML ๊ธฐ๋ฐ˜ "์•„๋ฆ„๋‹ค์›€"

1์–ต๊ฐœ ์ „๋ถ€ ๋‹ค ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋‹ค.

<head> ์•ˆ์— <style> ํƒœ๊ทธ ์•ˆ์— ๊ฐ‡ํ˜€ ์žˆ๋‹ค. 

๋””์ž์ธ์  ๋ถ€๋ถ„์„ ๋ณผ ๋• ์—ฌ๊ธฐ๋งŒ ๋ณด๋ฉด ๋œ๋‹ค.

์„ ํƒ์ž

class ์„ ํƒ์ž์—์„œ <body>์— ์ง์ ‘ class ="saw" , class = "saw active"๋ผ๊ณ  ์“ธ ๋•Œ, 
class = "saw active" ๋Š” "saw" ์ค‘์—์„œ active๋กœ ๋ณด๊ณ , 
  <head>์— ์“ธ๋•Œ .saw active๋ผ๊ณ  ์•ˆ์“ฐ๊ณ  .active ๋ผ๊ณ  ์“ด๋‹ค. 
 

๋ฐ•์Šค๋ชจ๋ธ

๊ทธ๋ฆฌ๋“œ

<div> </div>    ->     block element
<span> </span>  ->    inline element
1. ์ผ๋‹จ <body> ๋‚ด์šฉ ์ค‘์—์„œ <div>๋ฅผ ๊ฑธ์–ด๋‘”๋‹ค.
	๊ทธ๋ฆฌ๊ณ  ์ด๊ฒƒ๋“ค์„ ๋ฌถ๋Š” ์ƒ์œ„ <div>๋ฅผ ๋งŒ๋“ค๊ณ  ์—ฌ๊ธฐ์—๋‹ค๊ฐ€ id๋ฅผ ๊ฑด๋‹ค.
    		<div id = "DY">
            
2. ๊ทธ ๋‹ค์Œ์— ์œ„์— <style> ๊ฐ€์„œ #DY{display : grid;
                          grid-template-columns : 150px 1fr;
                             								}
                                                            
		#grid ol{  } ์ด๋ ‡๊ฒŒ ~์— ์†ํ•ด ์žˆ๋Š” ~๋งŒ ์ง€์ •ํ•ด์„œ ์„ค์ •ํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

๋ฐ˜์‘ํ˜• ๋””์ž์ธ

ํ™”๋ฉด์˜ ํฌ๊ธฐ์— ๋”ฐ๋ผ ๋””์ž์ธ์ด ๋ฐ”๋€๋‹ค.

@media(min-width:800px){
						div{ display:none; }
						#grid{border-right:none;}
                        					    }

์Šคํƒ€์ผ ์‹œํŠธ

<style> ์ž์ฒด๋ฅผ ํ•˜๋‚˜์˜ ํŒŒ์ผ๋กœ ๋งŒ๋“ค์–ด๋†“๊ณ  style.css๋กœ ์ €์žฅ ํ›„

<link rel = "stylesheet" href = "style.css">

css๋Š”,
์ฃผ์–ด์ธ ์„ ํƒ์ž๋ฅผ ๋งŽ์ด ์•Œ์ˆ˜๋ก ์ •ํ™•ํ•œ ํ‘œํ˜„์ด ๊ฐ€๋Šฅํ•˜๊ณ ,
์„œ์ˆ ์–ด์ธ ์†์„ฑ์„ ๋งŽ์ด ์•Œ์ˆ˜๋ก ํ’๋ถ€ํ•œ ํ‘œํ˜„์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

post-custom-banner

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