Brackets | Sololearn: Learn to code for FREE!

0

Brackets

hey guys whenever i close my brackets for instance like > it always then inputs </button> for some reason please reply

12/15/2016 6:21:04 PM

Noah

8 Answers

New Answer

+1

The editor is 'helping' you. It's about 50/50 whether it helps me though. The rule it's following is that all HTML tags should be closed, except some have different rules (like <br />... or <li> which can omit the closing tag).

+1

Yeah, sometimes it seems to confuse the issue and I keep wanting to turn it off.

+1

oh yeah, it 'helps' with quotes/double quotes too; I forgot. Remove the ' after alert.

+1

Put all that on the [js] tab without the <script> tags. Worked for me. You can make it a function for the button if you want.

0

well if its helping me it sure is doing a BS job LOL

0

well i am writing a program let me send you the link

0

https://code.sololearn.com/WBF8rDRcEQSH/#html

0

i was gonna do a program like this inside it <script> var answer=prompt("Help santa!"); if(answer=="go home")alert("MERRY CHRISTMAS YOU FILFY ANIMAL"); if(answer=="Help santa")alert("YOU GOTTA PRESENT!"); else alert("A good night to all and to all a good night"); </script>