All Questions
Tagged with code-formatting html
64
questions
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 ...
-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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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"...
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-...
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 ...
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 ...
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>...
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 ...
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="
...
-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 ...