Why is Notepad automatically formatting my HTML?

6 replies
  • WEB DESIGN
  • |
I'm trying to add a few lines to a .php file using notepad:

?<?php
/*
Template Name: oto
*/
?>

But when I save the file, notepad automatically converts it to:

?<?php/*Template Name: oto*/?>

Why?

I know ZERO about HTML. Only that I need to put these lines in at the top of my page. I've been doing it fine for the past several days, but now for some reason, notepad seems to want to f@#* with me.

Thanks,
-Rob
#automatically #formatting #html #notepad
  • Profile picture of the author RichPirate
    thats a strange issue. Try wordpad instead of notepad. or try downloading notepad++:

    .:: NOTEPAD++ ::.
    {{ DiscussionBoard.errors[1328085].message }}
  • Profile picture of the author Aronya
    Try copying the contents of the file & pasting into a new document. Save it with a slightly different name & see if the formatting is still being changed. I've seen things like this happen in Word, Excel, etc. No explanation for why, but creating a new document often fixes it.
    {{ DiscussionBoard.errors[1328328].message }}
  • Profile picture of the author bowbell
    In Notepad, click on format, check Word Wrap
    {{ DiscussionBoard.errors[1330280].message }}
  • Profile picture of the author jazbo
    I also recommend using notepad++, which can also mean you do not suffer from issues when uploading or modding your files.
    Signature
    CONTENT WRITER. Reliable, UK-Based, 6 Years Experience - ANY NICHE
    Click Here For Writing Samples & Online Ordering
    {{ DiscussionBoard.errors[1330297].message }}
  • Look for a plain text option. Or an option to turn off rich text formatting.
    {{ DiscussionBoard.errors[1330818].message }}
  • Profile picture of the author zapseo
    Plain text option ?
    When did notepad become an rtf processor ?

    If you just need to put something in at the top of your file and your host has cpanel, use the file manager.

    That way, when you edit it, the changes in your text file will be saved in the correct format.

    (For some reason, the "end of line" designator is different on all 3 operating systems -- Windows, Mac and Linux. And if your text file is saved with the wrong end-of-line designator, it can cause things to give bizarre results -- mostly as in, not working at all with odd error messages, depending upon what the text is.)

    Live JoyFully!

    Judy
    {{ DiscussionBoard.errors[1331520].message }}

Trending Topics