01
03
<!-- a 엘리먼트는 링크 버튼입니다. -->
<!-- target 속성은 새 창으로 띄울지 여부를 정합니다. -->
<!-- href 속성은 이동할 주소입니다. -->
<a href="https://to2.kr/bTn">bmx</a>
<!-- br은 줄바꿈 엘리먼트 입니다. -->
<br>
<br>
<a href="http://www.naver.com/" target="_blank">네이버</a>
a {
  background-color:red;
}

실행 화면

 

<a href="https://www.naver.com/" target="_blank">네이버</a> 입니다.
<br>
<a href="https://www.google.com/" target="_blank">구글</a> 입니다.
<br>
<a href="https://www.kakaocorp.com/" target="_blank">카카오</a> 입니다.

실행 화면

 

<!-- 아래 내용을 지우고 다시 만들어보세요. -->
<!--
a[href="https://www.naver.com"][target="_blank"]{네이버로 이동}+br+a[href="https://www.google.com"][target="_blank"]{구글로 이동}+br+a[href="https://daum.net"][target="_blank"]{다음으로 이동}
-->

<a href="https://www.naver.com" target="_blank">네이버로 이동</a>
<br>
<a href="https://www.google.com" target="_blank">구글로 이동</a>
<br>
<a href="https://daum.net" target="_blank">다음으로 이동</a>

<!-- 추가 emmet 문법 -->
<!--
table>tbody>tr*10>td*10{번호}
-->

<!--
table>tbody>tr*10>td*10{no. $}
-->

<!--
table>(thead>tr>th*5)+tbody>tr*5>td*5
-->

<!--
table[border="1"]*100
-->

실행 화면

 

<h1>문제 : div, section, article 태그를 사용해서 3가지 색의 막대를 만들어주세요.</h1>

<div></div>
<section></section>
<article></article>
div {
  height:100px;
  background-color:red;
}

section {
  height:100px;
  background-color:green;
}

article {
  height:100px;
  background-color:blue;
}

실행 화면

 

<h1>문제 : section(green 색 막대)과 article(blue 색 막대)을 한 줄에 보이게 해주세요.</h1>

<div></div>
<section></section>
<article></article>
div, section, article {
  height:100px;
  background-color:red;
}
section {
  background-color:green;
}
article {
  background-color:blue;
}
section, article {
  width:100px;
  display:inline-block;
}

실행 화면

 

console.clear();
console.log(1);
console.log(2);
console.log(3);
console.log('안녕');
console.log('잘가');
console.log(10 + 20);
console.log("안" + "녕");
console.log("안" + 10);
console.log("안" + (10 + 20));
console.log("안" + 10 * 20);

 

실행 화면

 

console.clear();

let x;
x = 5;
console.log(x);
x = 10;
console.log(x);
console.log(x);
console.log(x);
let x2 = 20;
console.log(x + x2);
let x3 = '안';
let x4 = '녕';
console.log(x3 + x4);

실행 화면

COMMENT