How does StackOverflow create its tag system. How can it format the html in a text area?
I just don't know where to begin. If someone could guide me, then I can know what direction to take so I can write some code that someone can check.
Like this:
EDIT: Basically, when I press space, how do i add a new element/div to the inside of the div?
Syntax. The <input> tag is empty, which means that the closing tag isn't required. But in XHTML, the (<input>) tag must be closed (<input/>).
is input a self closing tag? Yes, input is a self closing tag. You need not close it as it is an empty tag. It only has attributes but no content.
If you only want to style a specific input type, you can use attribute selectors: input[type=text] - will only select text fields. input[type=password] - will only select password fields. input[type=number] - will only select number fields.
What about Bootstrap solution?
You can try this :
HTML Code:
<input type="text" value="html,input,tag" data-role="tagsinput"></input>
For CSS, call these two files:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/dist/bootstrap-tagsinput.css">
For Javascript, call these two files:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
The code will generate the result below:
Check it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With