Help with HTML code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vincent
    Silver Member

    • Oct 2007
    • 337

    #1

    Help with HTML code

    On a page where the HTML code is active how does one show the actual code without it converting it to the image.
    If the code is this:

    <a href="http://www.jaffyhead.com" target="_blank"><img src="http://www.jaffyhead.com/style_images/11197887682/logo4.gif"
    alt="jaffyHead.com – You're Not Alone"
    style="border:1"
    title="jaffyHead.com - a safe social & educational networking site"></a>



    and I want it to remain like this on the page, how do I go about it.
    Vincent Marino
    Maximising the sales value of your business!

    Business 24-Seven |MyBlog Twitter |facebook |Phat feesh & chips





  • duncan drennan
    Email problem

    • Jun 2006
    • 2642

    #2
    I think the simplest way is to wrap it in the <code> </code> tags.

    There might be more advanced ways using CSS.

    |

    Comment

    • Dave A
      Site Caretaker

      • May 2006
      • 22812

      #3
      Did the code tag work, Vincent?

      If not, this the way the W3C Validator deals with the problem. They use this HTML code:

      Code:
      <pre>
            &lt;a href=&quot;http://validator.w3.org/check/referer&quot;&gt;&lt;img
                src=&quot;http://www.w3.org/Icons/valid-xhtml10&quot;
                alt=&quot;Valid XHTML 1.0!&quot; height=&quot;31&quot; width=&quot;88&quot; /&gt;&lt;/a&gt;
          &lt;/p&gt;
      </pre>
      which resolves into this on page display
      Code:
            <a href="http://validator.w3.org/check/referer"><img
                src="http://www.w3.org/Icons/valid-xhtml10"
                alt="Valid XHTML 1.0!" height="31" width="88" /></a>
      I know it looks messy, but it's less complicated than it looks. Basically you do some substituting.

      < = &lt;
      " = &quot;
      > = &gt;
      Last edited by Dave A; 30-Jan-08, 03:00 PM.
      Participation is voluntary.

      Alcocks Electrical Services | Alcocks Pest Control & Entomological Services | Alcocks Hygiene Services

      Comment

      • Vincent
        Silver Member

        • Oct 2007
        • 337

        #4
        < = &lt;
        " = &quot;
        > = &gt;
        I did the substitution but it still wasn't right. So I did the thing I should have done in the first place. Phoned my IT guy.
        Time wasted: Vince 2hrs
        Russell: 2 minutes

        Next time phone the professionals
        Vincent Marino
        Maximising the sales value of your business!

        Business 24-Seven |MyBlog Twitter |facebook |Phat feesh & chips





        Comment

        • Dave A
          Site Caretaker

          • May 2006
          • 22812

          #5
          And the right way to do it was...?

          Please let it not be NOPARSE
          Participation is voluntary.

          Alcocks Electrical Services | Alcocks Pest Control & Entomological Services | Alcocks Hygiene Services

          Comment

          • Dave A
            Site Caretaker

            • May 2006
            • 22812

            #6
            I've just tested this - works perfectly:
            Code:
            <p>&lt;a href=&quot;http://www.jaffyhead.com&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.jaffyhead.com/style_images/11197887682/logo4.gif&quot; 
            alt=&quot;jaffyHead.com – You're Not Alone&quot; style=&quot;border:1&quot; title=&quot;jaffyHead.com - a 
            safe social &amp; educational networking site&quot;&gt;&lt;/a&gt;</p>
            Participation is voluntary.

            Alcocks Electrical Services | Alcocks Pest Control & Entomological Services | Alcocks Hygiene Services

            Comment

            • Chatmaster
              Platinum Member

              • Aug 2006
              • 1065

              #7
              Speaking of which, Vincent I had a look at your linking proposal. Do you mind if I rather link to you using a link text from my sites? If you do not mind, what would your main keyword be that you are targeting?
              Roelof Vermeulen (Entrepreneurship in large organizations)
              Enterprise Art Management Software| Rock flaps south africa

              Comment

              • Vincent
                Silver Member

                • Oct 2007
                • 337

                #8
                Originally posted by Chatmaster
                Do you mind if I rather link to you using a link text from my sites? If you do not mind, what would your main keyword be that you are targeting?
                No problem... key word(s) grade 10, grade 11, grade 12, education, educational networking site... something along those lines.
                Let me know when you're done.
                Vincent Marino
                Maximising the sales value of your business!

                Business 24-Seven |MyBlog Twitter |facebook |Phat feesh & chips





                Comment

                • Vincent
                  Silver Member

                  • Oct 2007
                  • 337

                  #9
                  Originally posted by Dave A
                  And the right way to do it was...?
                  I actually have no idea... but this is what the code looks like.
                  Code:
                  <br/><br/>
                  &lt;a href="http://www.jaffyhead.com" target="_blank"&gt;
                  &lt;img src="http://www.jaffyhead.com/style_images/11197887682/logo_small.gif" 
                  alt="jaffyHead.com – You're Not Alone" 
                  style="border:1"  
                  title="jaffyHead.com - a safe social & educational networking site"&gt;&lt;/a&gt;
                  <br/><br/>
                  Tried it with <p>, but it wasn't picking up <p>

                  Guys thanks for the input, know going to try <Code>
                  Vincent Marino
                  Maximising the sales value of your business!

                  Business 24-Seven |MyBlog Twitter |facebook |Phat feesh & chips





                  Comment

                  • Dave A
                    Site Caretaker

                    • May 2006
                    • 22812

                    #10
                    That should produce the same results - although I had tidied out all the new lines for more compact code. Just a note on the br tag

                    For HTML, the use is <br>
                    For XHTML, the use is <br />

                    If you are using XHTML, you should also add a trailing / at the end of the img tag.

                    Not the end of the world. Browsers are very forgiving.
                    Participation is voluntary.

                    Alcocks Electrical Services | Alcocks Pest Control & Entomological Services | Alcocks Hygiene Services

                    Comment

                    • Chatmaster
                      Platinum Member

                      • Aug 2006
                      • 1065

                      #11
                      Originally posted by Vincent
                      No problem... key word(s) grade 10, grade 11, grade 12, education, educational networking site... something along those lines.
                      Let me know when you're done.
                      I will let you know. I am under allot of pressure atm and will try to link to your site the moment I have time
                      Roelof Vermeulen (Entrepreneurship in large organizations)
                      Enterprise Art Management Software| Rock flaps south africa

                      Comment

                      Working...