Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
2 votes
0 answers
24 views

Pre tag with style="white-space: pre-line" removes leading spaces as desired, but how can I prevent it from losing internal spacing?

I'm having an issue with the HTML pre tag. If I do a very simple test it preserves spacing the way that I want it to. For instance, notice that there are two spaces in a row in certain parts of the ...
kenneyher's user avatar
-1 votes
1 answer
88 views

How do I configure prettier to not separate my attributes onto new lines and not separate my opening bracket and closing bracket?

Before I state any of my problems this is my .prettierrc file so far { "semi": true, "useTabs": true, "tabWidth": 4 } Problem 1: I would like my prettier to ...
MrGod1y's user avatar
0 votes
0 answers
42 views

How to re-format HTML (in vscode) to remove unnecessary line breaks after every tag

I know that most code formatters have config to prevent breaking on <b>, <i> etc tags, but I cannot figure out what to do if the disaster already happened and I want to go back from 1000 ...
alparius's user avatar
0 votes
1 answer
618 views

Prettier code formatter inconsistency when formatting html code

I've been running into this issue there the Prettier code formatter isn't formatting my HTML code consistently in VS Code as seen below. I expect it to format both of the <input> tags the same ...
allgeo's user avatar
  • 21
0 votes
2 answers
117 views

How to code a proper checkbox that saves changes after refreshing page

I’m trying to do a simple personal website with checkboxes implemented into it, I’ve never done anything to do with coding ever so I’m super confused on how to put it all together. So far I have a ...
Juliana's user avatar
  • 11
2 votes
3 answers
5k views

How to structure html code using VS code?

There is an HTML document in which there are no indents. How to structure html code using VS code? Using extensions or not using extensions. The initial state of the HTML document. The required state ...
eusataf's user avatar
  • 877
2 votes
3 answers
3k views

Why Prettier code formatter stopped formatting in VS Code?

I am trying to format the code but the prettier isn't working fine with VS code. I also tried to reinstall it but the same problem occurs. I am not able to format my html css code with prettier. You ...
Vibhor Goyal's user avatar
0 votes
1 answer
932 views

What is and how can I remove/reduce the whitespace before and after preformatted code?

Here's an HTML showing some code in between two short lines of text <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta name="viewport"...
Enlico's user avatar
  • 26.7k
0 votes
1 answer
44 views

appending "https:" to links in a soup which start with src=//

First i webscrape using beautiful soup answers = soup.select('body > div.chg-body.no-nav.no-subnav.header-nav > div.chg-container.center-content > div.chg-container-content > div.chg-...
Shaun Menezes's user avatar
0 votes
1 answer
442 views

getting text form locally stored html files with python

I have some locally stored .html files and I am trying to read the text in, which I use for further data preprocessing. However, my program is always displaying the html code in the beginning as well ...
Chipi's user avatar
  • 17
1 vote
1 answer
1k views

Wordpress does add unwanted html tags to my code

I cant understand why wp adds some unwanted </p> tags to my lovely html. Do i miss something? Problem: It makes these empty </p> thus create a 3rem border on the bottom, of my ...
bass's user avatar
  • 36
1 vote
0 answers
58 views

Is there a name for this server-side HTML indentation style?

I have seen an indentation style - a methodology really - whereby the logic is indented totally separately from the HTML. Here is an example of what I mean: <div> if(something) { <div>...
zumafra's user avatar
  • 1,303
0 votes
0 answers
36 views

How to create a input field for formatted reply and get output as input in mysql and php

I am making a forum where someone requires to reply with their answer. From HTML <textarea> input the reply is limited with <pre> tag. Everyone doesn't know how to make a heading with tags ...
mhsumonnn's user avatar
10 votes
2 answers
4k views

How to prettify HTML so tag attributes will remain in one single line?

I got this little piece of code: text = """<html><head></head><body> <h1 style=" text-align: center; ">Main site</h1> <div> <p style=" ...
BPL's user avatar
  • 9,629
-1 votes
1 answer
279 views

How do I change the font used by my vs code editor? [closed]

I'm currently watching a video course on Angular2 development, and suddenly I see this: I know, I know. Pretty HTML attributes are not going to make me a better programmer. But I want this. I need ...
MartinJH's user avatar
  • 2,609

15 30 50 per page
1
2 3 4 5