CrazyEngineers
  • how the html code was placed

    Updated: Oct 12, 2024
    Views: 1.1K
    hi friends,
    when we open the site like friends18.com we find some html code for some images but any one khow how the html code was placed there is they are in image form.
    .
    or there is any html code for creating thats like box in which html is placed.
    .
    😁
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • gaurav.bhorkar

    MemberFeb 28, 2010

    I guess its just preformatted text enclosed in <PRE> ...... </PRE> or in <CODE> ....... </CODE> tags.
    Are you sure? This action cannot be undone.
    Cancel
  • Morningdot Hablu

    MemberFeb 28, 2010

    gaurav.bhorkar
    I guess its just preformatted text enclosed in <PRE> ...... </PRE> or in <CODE> ....... </CODE> tags.
    isn,t working gaurav it will display the picture for which i writen the html code.
    .
    i just want to display the html code like displayed in friends18.com like sites.

    😁
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberFeb 28, 2010

    Wops...not working.
    The <code> tag is only for computer code (like C++).

    As a workaround you can use &lt for < and &gt for > signs. But I guess, that wont solve your problem.

    Any CEan to address this issue?
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberFeb 28, 2010

    UPDATE:

    I checked the source of the friends18.com site and found out that they also have used &lt and &gt for < and > respectively.

    So, I guess, this is the only solution for your problem.

    One more suggestion from me, also wrap your code in <pre> tag so that the indention is also preserved.
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberFeb 28, 2010

    yes gaurav is right you can use &lt and & gt;

    For more knowledge you can refer this site

    <a href="https://www.w3schools.com" target="_blank" rel="nofollow noopener noreferrer">W3Schools Online Web Tutorials</a>
    Are you sure? This action cannot be undone.
    Cancel
  • Morningdot Hablu

    MemberMar 4, 2010

    gaurav.bhorkar
    UPDATE:

    I checked the source of the friends18.com site and found out that they also have used &lt and &gt for < and > respectively.

    So, I guess, this is the only solution for your problem.

    One more suggestion from me, also wrap your code in <pre> tag so that the indention is also preserved.
    thanks gaurav,
    finally i will got the solution in simple way i think <xmp>insert code here</xmp> that will do this but it will print my code in just one line can u help me to print my code in many different lines.
    😁
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberMar 4, 2010

    mohit007kumar00
    thanks gaurav,
    finally i will got the solution in simple way i think <xmp>insert code here</xmp> that will do this but it will print my code in just one line can u help me to print my code in many different lines.
    Well, <xmp> tag is deprecated, I'd suggest not to use it.

    I found one solution to your problem. Use the <textarea> tag with wrap attribute to display html code. It will also wrap the text.

    Following is an example code:

    <html>
    <head>
        <title>Hello</title>
    </head>
    <body>
    [COLOR=DarkRed][B]<textarea rows=15 cols=30 wrap=hard>[/B][/COLOR]
    [url=https://www.crazyengineers.com][img]https://farm4.static.flickr.com/3199/2962311462_cd81b8f8ff_o.png[/img][/url]
    Wassap
    <i>Hello world</i>
    [COLOR=DarkRed][B]</textarea>[/B][/COLOR]
    </body>
    </html>
    Checkout the output, and I'm sure you'll appreciate the use of <textarea> tag.
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberMar 4, 2010

    Check this also
    <html>
    <head>
    <title>
    How Html COde placed
    </title>
    </head>
    <body>
    <table border="1">
    <tr>
    <td>
    &lt html &gt;<br/>
    &lt head &gt;<br/>
    &lt title &gt;<br/>
    How Html COde placed<br/>
    &lt /title &gt;<br/>
    &lt /head &gt;<br/>
    </td>
    </tr>
    </body>
    </html></td>
    </tr>
    </body>
    </html>
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register