Programming/Html

[Html] Password field is not contained in a form Error 였λ₯˜ 원인 및 ν•΄κ²° 방법

yuri lee 2023. 1. 30. 07:33
λ°˜μ‘ν˜•

Intro

μ•ˆλ…•ν•˜μ„Έμš”. Html Input νƒœκ·Έλ₯Ό μ‚¬μš©ν•˜λ˜ 도쀑 μ•„λž˜μ™€ 같은 μ—λŸ¬κ°€ λ°œμƒν•˜μ˜€μŠ΅λ‹ˆλ‹€ .

 

Password field is not contained in a form

 

Why?

ꡬ글링을 ν•΄λ³΄λ‹ˆ, Input νƒœκ·Έκ°€ From νƒœκ·Έ μ•ˆμ— μœ„μΉ˜ν•˜μ§€ μ•Šμ•„ μƒκΈ°λŠ” λ¬Έμ œμ˜€μŠ΅λ‹ˆλ‹€. 사싀 κ²½κ³ (warning) ν‘œμ‹œλΌμ„œ μ½”λ“œ μˆ˜μ •μ„ 해주지 μ•Šμ•„λ„ λ¬Έμ œκ°€ λ˜μ§€ μ•Šμ§€λ§Œ, μ½˜μ†”μ°½μ— 계속 warning ν‘œμ‹œκ°€ λ˜μ–΄μžˆλŠ” 것이 λ§ˆμŒμ— 걸리기 λ•Œλ¬Έμ— μˆ˜μ •μ„ 해보도둝 ν•©μ‹œλ‹€! πŸ™ƒ

 

How to solve the problem

μ•„λž˜μ™€ 같이 Html μ½”λ“œλ₯Ό μˆ˜μ •ν•˜λ©΄ 더이상 λ‹€μŒμ˜ 였λ₯˜λŠ” λ°œμƒν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 

<form>
  <input type="password" name="my-password" size="5" maxlength="20">
</form>

 

Conclusion

Html은 μ‰¬μš°λ©΄μ„œλ„ μ–΄λ ΅κ³ , μ–΄λ €μš°λ©΄μ„œλ„ μ‰¬μš΄ 쑴재인 것 κ°™μŠ΅λ‹ˆλ‹€.πŸ˜‡

λ°˜μ‘ν˜•