SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    First-timer, questions about programs used for coding.

    Hi everyone,

    I'm Eric and just joined b/c I'm fairly new to web design. I've learned JS, CSS, HTML and some Jquery on Codecademy for the past year and am in the process of building a site for my music. I've already signed up with ipage.com as a hosting site, I'm going to be doing it from scratch and uploading files to FileSharer. A few questions:

    1. What program does one use for writing html/css/js? Just Wordpad or Notepad? How do you save the file as an HTML file, it doesn't give that option under Save As.

    2. Can you put your html and css in the same file, or is it better to do them separately? If you do one with css, can you save it as an HTML file? Do you save a Javascript file under HTML as well?

    Thanks for any help.

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi
    1. For writing code I use Notepad++, and save the file with Save As "name.html".
    2. It is better to have the css and js code separately in "*.css" and "*.js" file, so, you can easily include that code in html pages. You can also write css/js code in html document.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,620
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Yes, best to keep CSS and JS separate, as it can then be used on all pages. There are lots of free code editors and some nice paid ones too, like Sublime Text 2.

    But you can use the simple text editor that comes with you computer, too, like Notepad on Win and TextEdit on Mac.

    You can even just change the file extension from .txt to .html or .css etc. as well.

  4. #4
    SitePoint Addict bronze trophy
    Join Date
    Mar 2013
    Location
    Oneonta, NY
    Posts
    307
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Zircona,

    Try Notepad++. There are options to save documents in all sorts of formats. Some other options are Aptana, Netbeans and Microsoft Visual Web Developer. I would recommend starting off with something like the Microsoft product or Notepad++ if you are a beginner. Some of the other programs are great but hard to use if you aren’t use to programming.

    For your second question, in general it is better to keep your CSS and JS files separate however this is not an absolute truth. For example when optimizing a website for speed, it is better to use inline CSS and JS code when that code is not used that often. By contrast, if you have one more http request every time a page loads for CSS or JS that is only used occasionally, you are not using resources optimally.

    Further, if you only have a small amount of CSS and JS, it is a best practice to have it embedded either inline or within your HTML document to reduce http requests to the server. Also, remember to put any CSS http requests before any JavaScript requests in your html document.

    You can get more info on that here,

    https://developers.google.com/speed/pagespeed/
    Hope that helps,

    Shawn

  5. #5
    SitePoint Mentor silver trophybronze trophy
    Mikl's Avatar
    Join Date
    Dec 2011
    Location
    Edinburgh, Scotland
    Posts
    1,449
    Mentioned
    59 Post(s)
    Tagged
    0 Thread(s)
    Regarding your point about there being no HTML option under Save As. An HTML file is essentially just a plain text file that happens to contain HTML code. You don't need to explicitly save it as HTML. Just a plain "save as text" - or something similar - will do the trick (but be sure to give it an extension of HTML or HTM).

    The same applies to CSS and Javascript files. They're just plain text files. In these cases, the relevant extensions are CSS and JS.

    It's also worth keeping in mind that there are two types of tools for creating these files:

    - The plain text editors, like Notepad, Notepad++, Programmers Notepad, and TextEdit, where you code the relevant tags by hand.

    - And the so-called WISIWYG editors, which work more like word processors; for example, if you format some text as bold or italic, you actually see that formatting on the screen rather than <i> or <b> tags or whatever; a good example from this group is free CoffeeCup editor.

    For someone starting out, I'd recommend the first of the above, if only because it forces you to learn the relevant coding (HTML, CSS or whatever). The second goup are better for someone who want to create a site but who doesn't want to learn the underlying language.

    To get the best of both worlds, consider Microsoft's free Web Developer Express. This is essentially a text editor (like Notepad++, etc), but it also has a limited WYSIWYG mode, which is good for doing quick previews and editing small chunks of text.

    Hope this helps.

    Mike

  6. #6
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the responses guys. I downloaded Notepad++ yesterday, gonna check it out.

  7. #7
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a heads up. I used Notepad++ for a couple of years but just discovered Sublime Text 2 which I find is personally better. Has some great plugins, looks and feels nicer too!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •