how the html code was placed

Morningdot Hablu

Morningdot Hablu

@morningdot-6Xuj4M β€’ Oct 12, 2024

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.
.
😁

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Feb 28, 2010

    I guess its just preformatted text enclosed in <PRE> ...... </PRE> or in <CODE> ....... </CODE> tags.

  • Morningdot Hablu

    Morningdot Hablu

    @morningdot-6Xuj4M Feb 28, 2010

    gaurav.bhorkarI 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.

    😁

  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Feb 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?

  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Feb 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.

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Feb 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>

  • Morningdot Hablu

    Morningdot Hablu

    @morningdot-6Xuj4M Mar 4, 2010

    gaurav.bhorkarUPDATE:

    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.
    😁

  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Mar 4, 2010

    mohit007kumar00thanks 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.

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Mar 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>