html과 javascript - div ,span ,id, class

정세형·2023년 2월 3일
0

html

목록 보기
3/3
<div></div>

: 어떠한 기능도 없음 css ,javscript를 통해서 정보를 제어하고자 할때 감사주는 무색무취의 태그 화면 전체를 쓰기때문에 (줄바꿈 되는 태그)

<span> </span>

:어떠한 기능도 없음 css ,javscript를 통해서 정보를 제어하고자 할때 감사주는 무색무취의 태그 (줄바꿈 되지 않는 태그)

class : 그룹핑 광범위하게
class의 style 지정 .

id : 한가지 대상을 식별 (중복되지 않아야함!) ex) 예외적인 디자인 변화
id의 style 지정 #

우선순위:
id > class

우선 순위:
id > class > <div>,<span>..등 태그

적용 예시 코드입니다.

 <h1><a href="index.html">WEB</a></h1>
  <input type="button" value="night" onclick="
    document.querySelector('body').style.backgroundColor = 'black';
    document.querySelector('body').style.color = 'white';
  ">
  <input type="button" value="day" onclick="
    document.querySelector('body').style.backgroundColor = 'white';
    document.querySelector('body').style.color = 'black';
  ">
  <ol>
    <li><a href="1.html">HTML</a></li>
    <li><a href="2.html">CSS</a></li>
    <li><a href="3.html">JavaScript</a></li>
  </ol>
   <h2 style="background-color:coral;color:powderblue;">JavaScript</h2>
   <span id="first" class="js">JavaScript</span> (/ˈdʒɑːvəˌskrɪpt/[6]), often abbreviated as JS, is a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language. Alongside <span>HTML</span> and <span>CSS</span>, <span class="js">JavaScript</span> is one of the three core technologies of World Wide Web content production. It is used to make webpages interactive and provide online programs, including video games. The majority of websites employ it, and all modern web browsers support it without the need for plug-ins by means of a built-in <span class="js">JavaScript</span> engine. Each of the many <span class="js">JavaScript</span> engines represent a different implementation of <span class="js">JavaScript</span>, all based on the ECMAScript specification, with some engines not supporting the spec fully, and with many engines supporting additional features beyond ECMA.
  </p>

WEB

  1. HTML
  2. CSS
  3. JavaScript

JavaScript

JavaScript (/ˈdʒɑːvəˌskrɪpt/[6]), often abbreviated as JS, is a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language. Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production. It is used to make webpages interactive and provide online programs, including video games. The majority of websites employ it, and all modern web browsers support it without the need for plug-ins by means of a built-in JavaScript engine. Each of the many JavaScript engines represent a different implementation of JavaScript, all based on the ECMAScript specification, with some engines not supporting the spec fully, and with many engines supporting additional features beyond ECMA.

    .js{
      font-weight: bold;
      color:red;
    }
    #first{
      color:green;
    }
    span{
      color:blue;
    }
profile
👨‍💻github.com/pos1504 💌pos1504@gmail.com 🙋‍♂️https://www.linkedin.com/in/%EC%84%B8%ED%98%95-%EC%A0%95-68067b287/

0개의 댓글