Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Running html to test it via my browser - beginner  (Read 16122 times)

0 Members and 1 Guest are viewing this topic.

willythecat

    Topic Starter


    Hopeful

    • Experience: Beginner
    • OS: Windows 7
    Running html to test it via my browser - beginner
    « on: June 05, 2012, 04:18:30 PM »
    I am an ABSOLUTE newbie to all this html, but have been reading through the tutorials which are really interesting.
    Now don't laugh, but created a very basic notepad file with -  (html)  (h1)hello(h1) (html), saved is as hello.html, ran it in my browser, and up came the word hello. Great, have got the basic principle (and obviously the "()" would be "<>").
    Now running before l can walk, so hope l can explain this clearly, have just joined a free imaging site called postimage . org, which l assume to be similar to Photobucket/Imageshack et al.
    Just for testing, did a snip of my task manager display and uploaded it to this site which does what it says on the tin. It then returns 8 links to choose from which can be saved to the clipboard. The 8 headings were Link, Direct Link, Thumbnails for forum 1, Thumbnails for forum 2, Thumbnails for website, Hotlink for forum 1, Hotlink for forum 2 and Hotlink for website. Each link downloaded for each heading was slightly different. I assume for posting purposes, the ones l should be concerned with are the thumbnails(?) but nevertheless downloaded all 8 into separate files named download1 to download8.
    Whatever file l download into my browser doesn't show me the image so why is that?
    Also, l have seen brackets to be shown as " [ ] ". Can l use these or do l have to use " < > " as in your tutorials?
    Just for test purposes, as it only shows my task manager screen, the url given to me for "Thumbnails for forum 1" is -
    (url=http://postimage.org/image/ef4ou8r27/)(img)http://s19.postimage.org/ef4ou8r27/taskcapture.jpg(/img)(/url) - l have changed the " [ ] " to " ( ) ".
    What l really want to be able to do straight away, before l even start learning the ins and outs of html, is to just post a message onto a forum (not this one of course) saying something like "if you go into task manager, this is what you will see. Press here to view"
    Any help will be much appreciated.
    Regards



    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Running html to test it via my browser - beginner
    « Reply #1 on: June 05, 2012, 06:37:14 PM »
    On this forum the easy way to include a screenshot is to just make an attachment. I just made a screen shkot of your post and saved it as a JPG file. I reduced it down so not to take a lot of disk space.


    [year+ old attachment deleted by admin]

    soybean



      Genius
    • The first soybean ever to learn the computer.
    • Thanked: 469
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    Re: Running html to test it via my browser - beginner
    « Reply #2 on: June 05, 2012, 06:48:56 PM »
    Testing:



    It worked. The image above was uploaded to postimage.org and I simply copied the Thumbnail for Forums (1) and put that code string in my post here.  You do not change [] to (); just copy the code from postimage.org. It's just that simple. 

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Running html to test it via my browser - beginner
    « Reply #3 on: June 05, 2012, 08:11:00 PM »
    Yeah, Forums like this don't need HTML.
    I am not sure if you can even inset it. Let's see

    HTML       < using the bold widget

    HTML   < using just HTML

    Hmm. guess it works anyway! Didn't know that!

    Salmon Trout

    • Guest
    Re: Running html to test it via my browser - beginner
    « Reply #4 on: June 05, 2012, 11:55:09 PM »
    Yeah, Forums like this don't need HTML.
    I am not sure if you can even inset it. Let's see

    HTML       < using the bold widget

    HTML   < using just HTML

    Hmm. guess it works anyway! Didn't know that!

    Isn't that a bit dangerous? I thought most forums disabled HTML in posts.


    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Running html to test it via my browser - beginner
    « Reply #5 on: June 06, 2012, 12:33:22 AM »
    Isn't that a bit dangerous? I thought most forums disabled HTML in posts.
    Well, I must be in hot water now. I promise I will not do nit again.

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Running html to test it via my browser - beginner
    « Reply #6 on: June 06, 2012, 01:02:34 AM »
    It only works for certain tags. At least, it shouldn't. Fairly sure it just swaps out a few specific tags with bbcode.
    <div>this should be in a div</div>
    <script>
    window.alert("testing")
    </script>
    <span style="font-family: Consolas,'Lucida Console','Liberation Mono'>Testing</span>
    <strong>in a strong tag</strong>
    in a bold tag
    italics anyone
    <emph> or maybe emphasis?</emph>




    Nope, doesn't seem to work with the above. Seems limited to at least the i and b tags. doesn't even work with their equivalent <strong> and <emph>. I'm sure the subset is documented somewhere- this was likely a change that occured with SMF2.0, since I don't recall any HTML tags working at all previously.


    Anyway: to answer the OP's question:

    Most forums use BBCode, or at leaast support it. That is usually what the forum links on image hosts provide.

    BBCode does not work with a browser. BBCode is parsed on the server side, and then turned into HTML for the request. The purpose being that if a forum post allowed any HTML, than a person could easily use all sorts of nasty exploits, mess around with the DOM, insert javascript, etc. The BBCode for what you want, at least using the variation of BBCode supported by this forum, would be:

    Code: [Select]
    [url=http://s19.postimage.org/ef4ou8r27/taskcapture.jpg][img]http://s19.postimage.org/ef4ou8r27/taskcapture.jpg[/img][/url]
    Which results in this:




    For a HTML link you would use:

    Code: [Select]
    <a href="http://s19.postimage.org/ef4ou8r27/taskcapture.jpg"><img src="http://s19.postimage.org/ef4ou8r27/taskcapture.jpg"></a>
    I was trying to dereference Null Pointers before it was cool.

    willythecat

      Topic Starter


      Hopeful

      • Experience: Beginner
      • OS: Windows 7
      Re: Running html to test it via my browser - beginner
      « Reply #7 on: June 07, 2012, 08:44:28 AM »
      Thanks everyone (and to BC_P for a more precise answer).
      Didn't want to post a screen shot to THIS site albeit the advice in doing so is very much appreciated.
      Have finally got it to work on another site which suits my needs. This other sites' forum allows
      So just typed my message and then used the "direct link" received from the image hosting site, something like -
      To view image [url=direct link address]press here] commands but not [img]
      So just typed my message and then used the "direct link" received from the image hosting site, something like -
      To view image [url=direct link address]press here

      - and this works a treat.
      Thanks for taking the time to reply
      Regards


      soybean



        Genius
      • The first soybean ever to learn the computer.
      • Thanked: 469
      • Computer: Specs
      • Experience: Experienced
      • OS: Windows 10
      Re: Running html to test it via my browser - beginner
      « Reply #8 on: June 07, 2012, 09:16:39 AM »
      Is that other forum Powered by vBulletin?  If not, what forum software does it use?  You can usually find this stated at the bottom of the forum page.

      Rob Pomeroy



        Prodigy

      • Systems Architect
      • Thanked: 124
        • Me
      • Experience: Expert
      • OS: Other
      Re: Running html to test it via my browser - beginner
      « Reply #9 on: June 14, 2012, 05:06:34 AM »
      <emph> or maybe emphasis?</emph>
      <em></em> works though
      Only able to visit the forums sporadically, sorry.

      Geek & Dummy - honest news, reviews and howtos

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Running html to test it via my browser - beginner
      « Reply #10 on: June 14, 2012, 03:19:01 PM »
      <em></em> works though

      oh, I got the tag wrong :). I wonder why <emph>emph</emph> works, but not <strong>strong</strong>?
      I was trying to dereference Null Pointers before it was cool.

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Running html to test it via my browser - beginner
      « Reply #11 on: June 14, 2012, 07:44:42 PM »
      oh, I got the tag wrong :). I wonder why <emph>emph</emph> works, but not <strong>strong</strong>?
      Well... Somebody said that HTML is not really a computer language. It is more like a list of suggestions for the browser.

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Running html to test it via my browser - beginner
      « Reply #12 on: June 14, 2012, 08:02:45 PM »
      Well... Somebody said that HTML is not really a computer language. It is more like a list of suggestions for the browser.
      the strong an em tags always work in a browser. My question was directed more towards why SMF recognizes the em tag but not the strong tag. when I was going with the emph as the tag, it made sense; they probably just went with b and i. but since em works, why not strong?

      I was trying to dereference Null Pointers before it was cool.

      Rob Pomeroy



        Prodigy

      • Systems Architect
      • Thanked: 124
        • Me
      • Experience: Expert
      • OS: Other
      Re: Running html to test it via my browser - beginner
      « Reply #13 on: June 15, 2012, 02:23:07 AM »
      I can tell you technically why <strong> doesn't work - it's simply not parsed and replaced: http://www.simplemachines.org/community/index.php?topic=376342.msg2587935#msg2587935

      As for why that tag was missed from the list of HTML substitutions... I doubt anyone remembers.  I'd guess that whoever coded the function in question simply forgot about <strong>.
      Only able to visit the forums sporadically, sorry.

      Geek & Dummy - honest news, reviews and howtos

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Running html to test it via my browser - beginner
      « Reply #14 on: June 15, 2012, 02:24:58 AM »
      I can tell you technically why <strong> doesn't work - it's simply not parsed and replaced: http://www.simplemachines.org/community/index.php?topic=376342.msg2587935#msg2587935

      As for why that tag was missed from the list of HTML substitutions... I doubt anyone remembers.  I'd guess that whoever coded the function in question simply forgot about <strong>.

      yeah my question was more the why on the human side, I just wonder if it was a purposeful omission or whether it was simply overlooked.
      I was trying to dereference Null Pointers before it was cool.