Menu

Insert Doctype at top of HTML?

2007-09-08
2012-11-13
  • Nobody/Anonymous

    I am just learning HTML and how to use editors like Notepad++.  I noticed that some editors will allow you to choose which Doctype (am I saying that right?) at the top of my HTML files.  XHTML Strict, etc.  Is this something that Notepad++ can do?  I would rather not have to type that out and it would be easier to just have it inserted than to go copy/paste it.

    Anyways, hope that make sense.  Thanks for your time.

    Dan

     
    • Nobody/Anonymous

      Thanks for that.  Sounds like a good idea.  It is too bad there is not a way to simply choose the Doctype from the "open" menu.

      I will try to get that QuickText working.

       
    • Nobody/Anonymous

      What I do is use the QuickText plug-in. I type the keyword for the doctype I want to see, select it, and press CTRL-Enter. I've created a QuickText keyword "htmldoc" for the HTML 4.01 Transitional doctype, and another "xhtmldoc" for the XHTML 1.0 Strict doctype (including the <html> tag with namespace and language), as these are really the only ones I use.

      I defined it just on the HTML language, and set the file to language HTML when I want to use HTML keywords. If you prefer, you could stick your doctype keywords into all relevant languages (HTML, PHP, ASP, etc.) so you don't need to play Pick A Language every time you use QuickText.