Community
    • Login

    Between html/css tags

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 864 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Matija SavićM
      Matija Savić
      last edited by

      Hi, i started learning HTML and CSS and i would like to whenever i put something in between tags, let’s say

      <html>

      </html>

      to go a bit right, and not left, here’s what i mean :

      <html>

         sjaisjaisjia
      

      </html>

      and not like this

      <html>
      sjiasjaiosjaioisja
      </html>

      it’s kinda ugly like that, is there a option in settings to remove this and set it up like i want?

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • Meta ChuhM
        Meta Chuh moderator @Matija Savić
        last edited by Meta Chuh

        welcome to the notepad++ community, @Matija-Savić

        there are many ways to do indenting in html output.

        if you want to output your text the same way as you see it in notepad++ (pre-formatted), you can use the <pre> tag.

        for example:

        <html>
        	<pre>
        	my text
        		more text
        			even more text
        	</pre>
        </html>
        

        will look like this in a browser window:

        	my text
        		more text
        			even more text
        

        you can find more ways about how to do html output indenting here: http://www.blooberry.com/indexdot/html/topics/indent.htm

        note:
        if you just want to indent your html source code in notepad++, just press the tab key at the beginning of a line (for example the line below <html>).
        all following lines will also start at the same position as this one, the same amount of tabs you used at the line above will automatically be added to the next one, like seen at the screenshot below:

        Imgur.

        1 Reply Last reply Reply Quote 3
        • andrecool-68A
          andrecool-68
          last edited by

          1. Try enabling the option:
            Settings >> Preferences >> MISC >> Auto-indent
          2. Test the Tidy 2 plugin, it can format the finished code.
          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors