Home > front end >  HTML the length of text inside <p> tag is not the same as code editor
HTML the length of text inside <p> tag is not the same as code editor

Time:11-17

about HTML: as shown in the picture. I have two p tags with the same length of text in textEditor, but they display different length in HTML, can any one tell me the reason, Thank you ! enter image description here

CodePudding user response:

A monospaced font, also called a fixed-pitch, fixed-width, or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space. This contrasts with variable-width fonts, where the letters and spacings have different widths.

(from Monospaced font - Wikipedia)

Your editor on the left is using a monospaced font whereas the rendered HTML on the right uses a variable-width font.

  •  Tags:  
  • html
  • Related