• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.
    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS VSCode Automated Close Tag Question

When I type <span>, or basically any starting tag, there will instantly be the closing tag created after it </span> so now looking like <span></span>
This is very efficient for when I am starting the document with <html><css><head><body> and all of that.
However, say there is a text here that says DETROIT.
I want to put <strong> tags around that, to emphasize it. So when I click before DETROIT and I type <strong>, it creates the closing tag </strong> so now it looks like <strong></strong>DETROIT.
Is there a way I can do a starting tag before a block of text, like DETROIT, and have either NO automated closing tag, or a way to press a button to move the closing tag forward a block, to become <strong>DETROIT</strong>
..without me having to delete the closing tag and rewriting it after the block of text?
I hope I explained this well but if you need any clarification please ask me!
 

Master Yoda

Administrator
Administrator
Verified
Hmm please correct me if I am wrong.. You want it to add both beginning tag and closing tag around a word automatically?

This really depends on what IDE you are using I believe.
 
Hmm please correct me if I am wrong.. You want it to add both beginning tag and closing tag around a word automatically?

This really depends on what IDE you are using I believe.
Sorry I really should have mentioned I am using VS Code!
I guess this question is more software oriented than coding oriented.
I wanted to either stop the automation of automatically creating the closing tag after typing the > of the opening tag, or press a keyboard button to make that automated closing tag go after the block of text proceeding it.
 

Master Yoda

Administrator
Administrator
Verified
Sorry I really should have mentioned I am using VS Code!
I guess this question is more software oriented than coding oriented.
I wanted to either stop the automation of automatically creating the closing tag after typing the > of the opening tag, or press a keyboard button to make that automated closing tag go after the block of text proceeding it.
Honestly, you did in your title. I wasn't paying attention. My apologies. I'm not all too familiar with VSCode.

But, maybe have a look at https://github.com/microsoft/vscode-htmltagwrap
 
Top Bottom