본문 바로가기
Today I learned!/오늘 하루 배운 것, 기억할 것

220410(html,css)

by sweesweet 2022. 4. 11.

폼을 만들다보니, 정확하게 만드는 게 좋을 것 같아서   mdn에서 폼요소, 폼 안에 자주등장하는 요소들을 검색해보았다

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form

 

<form>: The Form element - HTML: HyperText Markup Language | MDN

The <form> HTML element represents a document section containing interactive controls for submitting information.

developer.mozilla.org

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input

 

<input>: The Input (Form Input) element - HTML: HyperText Markup Language | MDN

The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. The <input> element

developer.mozilla.org

1. 폼이나 인풋 요소에서 css 가상클래스를 주어서 valid할 때, invalid할때 따로 css를 줄 수 있다.

https://developer.mozilla.org/en-US/docs/Web/CSS/:valid

https://getbootstrap.kr/docs/5.0/forms/validation/ <- 검색하다가 주워옴

나의 궁금증은, css 처리로 할 수 있지만, 보통 js로 유효성 검사를 하지 않나? valid invalid는 html에서만 유용하지 않을까

ps: valid JS를 치니 free validation code Javascript 의 게시물들이 쏟아졌다. 저 코드들을 보면서 남들이 만든 코드는 어떨지 확인해봐야겠다( 로그인, 회원가입)

 

 

'Today I learned! > 오늘 하루 배운 것, 기억할 것' 카테고리의 다른 글

220412(잡다)  (0) 2022.04.12
220411(css)  (0) 2022.04.11
220405(css)  (0) 2022.04.05
220401(css)  (0) 2022.04.01
220330(css, html 혼자 깨달은 점)  (0) 2022.03.30