12 replies
  • WEB DESIGN
  • |
Hello Everyone,

When I am on my site with the browser you can view the source code. Is that just a view of it? Or is it something I can edit or copy and paste to Notepad and then repost the code?
#code #question #source
  • Profile picture of the author mywebwork
    It's a view of the exact HTML your browser is seeing. If you copied it and saved it as an HTML document you should see an exact replica of the page you viewed.

    Not sure why you'd want to go through this exercise on your OWN site (which I believe is what you said), but I'm sure you have your reasons!

    Bill
    {{ DiscussionBoard.errors[5302173].message }}
  • Profile picture of the author Patrick
    lol. You can only view the code. You cannot modify it unless you have FTP access.
    {{ DiscussionBoard.errors[5305612].message }}
  • Profile picture of the author Rankx
    This is just to view the code. I normally would use the "Inspect Element" feature in Google Chrome or Firebug for firebox, to analyse and modify certain code to see how it looks. However, this is just a temporary change, and it goes back to the original once you refresh the page. So maybe you can give more information about why you want to view the source. Do you not have direct access to the files?
    {{ DiscussionBoard.errors[5305671].message }}
    • Profile picture of the author Power User
      Thanks for everybodys input Just getting back to things now after the holiday. I am trying to teach my self HTML. I have been studying and doing some exercises. I was wanting to copy the code in to a word press page and try editing things to see how it affects the code and thought that would be a way to do it. When I copied it to a page on the HTML tab it didn't work. Any ideas anyone. Thanks for your help.
      {{ DiscussionBoard.errors[5325123].message }}
  • Profile picture of the author Istvan Horvath
    WP should not be used to learn basic HTML. Start from the ABC and when you know HTML well - you can start experimenting with the template files in the WP themes.

    Start there (from the beginning) - HTML Tutorial
    Signature

    {{ DiscussionBoard.errors[5325331].message }}
    • Profile picture of the author Power User
      Your input is taken and I have been to that site. I am not questioning your skill. I asked a question that I was trying to find an answer to otherwise I would not post the question. I have been studying and doing some exercises as I said above and been to that site many times and have even took some online classes. Not everybody learns the same way. With that said can somebody answer the question or should I use a HTML editor. Thanks




      i
      {{ DiscussionBoard.errors[5325389].message }}
      • Profile picture of the author ronc0011
        Get an HTML editor, there a number of free editors out there. Find one that flags coding errors and if possible one that offers other coding tips. This can be a real help when learning HTML and CSS.
        {{ DiscussionBoard.errors[5325515].message }}
  • Profile picture of the author Istvan Horvath
    Your so-called question (=editing what you see after clicking the "view source code") does NOT make sense... and even then 3 people before me answered that you can NOT EDIT it in that way. Period.

    Yes, for editing HTML (not the code what you see in source code view) you should use a HTML editor.

    And let's make it clear: you can edit on your computer only a file that is saved and exists on your hard drive. You can even save as a html file this page where we are having this discussion and after saving it you can edit it as much as you want - on your machine. However, that will not have any effect on the look of the original page here on WF.

    Furthermore, let's make a distinction between traditional HTML (web) pages and HTML created on the fly by database-driven content management systems, like WordPress.

    When you look at the source code of your traditional HTML site - that is more or less the same as what you'd see by just opening the existing HTML files on your machine. I am always assuming people have all their web site saved on their own computer as a backup.

    However, looking at the source code of a web page created by a PHP/MySQL based system that outputs the content stored in the database through a(n otherwise empty skeleton-like) template file... won't help you, except getting an idea what the final output is. What you get in that source view can NOT be modified/edited the way you thought it could: editing what you saw in the source code and uploading it back. Forget it - things don't work like that. Is is clear now?

    Since you mentioned a WordPress site - forget this whole source code thing, it will never help you to edit anything in WP.
    For editing content (posts & Pages; comments) - use the wp-admin interface.
    For editing the layout/design - edit the XHTML template files & the style.css file.

    BTW, what is it that you really want to do in that WP installation of yours?
    Wouldn't be simpler to just ask a direct question?
    Signature

    {{ DiscussionBoard.errors[5325512].message }}
  • Profile picture of the author Power User
    Istvan if I can call you by your name. This is some solid information here you gave.That is awesome. Now this makes more sense to me I am researching this now to digest what you wrote and will look for a editor. I am trying to make a page for instructions on how to set up a rotator. I thought that if I took examples and see how it was done I could use that to teach me and understand better.But I have to do it differently now I see. I learn more by doing it and learning by trial and error. That was my reason for the question. Ant solid advice on learning in that form. Thanks to the both of you for the help. Can you suggest a editor that does what you said above?
    {{ DiscussionBoard.errors[5325815].message }}
    • Profile picture of the author Renavon
      Originally Posted by Power User View Post

      Istvan if I can call you by your name. This is some solid information here you gave.That is awesome. Now this makes more sense to me I am researching this now to digest what you wrote and will look for a editor. I am trying to make a page for instructions on how to set up a rotator. I thought that if I took examples and see how it was done I could use that to teach me and understand better.But I have to do it differently now I see. I learn more by doing it and learning by trial and error. That was my reason for the question. Ant solid advice on learning in that form. Thanks to the both of you for the help. Can you suggest a editor that does what you said above?
      I encourage your idea. You can see the source code to learn how they works. But, you need to be a little more experienced. You should understand difference between HTML and PHP/ASP.

      PHP/ASP scripting code is different than HTML. You will always see HTML output of the code when you see a webpage, even if that page was originally coded with PHP. This is because these are server side scripting language. But you can see the Javascript on the source code as this is browser side scripting. So, this process won't work for wordpress as it use PHP language.

      You should use Dreamweaver, Firstpage or any other editor for this. You can also use notepad. Code HTML and save it using .html extension and see the output in a browser. Remember this same process won't work for PHP/ASP.

      After you've gained some experience with HTML, you can see the source code of the website to get idea how they works. But remember this will help you to learn how HTML work, not how the website works.
      {{ DiscussionBoard.errors[5328395].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by Power User View Post

      Istvan if I can call you by your name. This is some solid information here you gave.That is awesome. Now this makes more sense to me I am researching this now to digest what you wrote and will look for a editor. I am trying to make a page for instructions on how to set up a rotator. I thought that if I took examples and see how it was done I could use that to teach me and understand better.But I have to do it differently now I see. I learn more by doing it and learning by trial and error. That was my reason for the question. Ant solid advice on learning in that form. Thanks to the both of you for the help. Can you suggest a editor that does what you said above?
      Yes, I prefer you call me by my name rather than using some other name

      As for editor...I use PSPad for years now and I am very happy with it. And it' free. editor PSPad - freeware HTML editor, PHP editor, XHTML, JavaScript, ASP, Perl, C, HEX editor

      As for what you want to do: I still find your question(s) quite vague, not specific... therefore difficult to answer.

      I am trying to make a page for instructions on how to set up a rotator
      - what kind of rotator?
      - for text or for images or...?
      - written in what langauge? PHP? JS?

      You see, by looking at the source code of a rotator script written in PHP you will see NOTHING. Absolutely nothing! The PHP code is executed on the server and not shown.
      If it is a javascript (JS) you may or may not see the full code: it could be there and it could be in a completely different file that you don't see (only the reference to it).

      While taking a look at the source code of a site can give you hints where to look further and/or what kind of resources to use to achieve a similar result... in itself it's just an intermediary tool, not a solution!

      As a side note: if you are not that good (yet) with HTML editing... WHY do you think it's a good idea that you make a page with "instructions" for others??? When I was at the beginning of my journey in HTML I didn't dare to 'teach' others about things that I didn't know.
      Signature

      {{ DiscussionBoard.errors[5332041].message }}
      • Profile picture of the author Power User
        Renavon,Thanks for the input and understanding what I am doing. The information is guiding me in the right direction.

        Istvan,your info is very valuable and I am studing as we talk. I am not trying to teach anybody about HTML. Why would I do that when I am learining the basics? I am wanting to make a instruction page for something totally different. I have been trying to learn how to make a page myself and I thought this would help by looking at the source code of other pages but I know different now. With it being winter now I have free time to teach myself. Thats why I need the help from the forum now.
        {{ DiscussionBoard.errors[5332315].message }}

Trending Topics