/    Sign up×
Community /Pin to ProfileBookmark

How to place HTML & CSS in a Box?

How do I place sample HTML and/or CSS code in a box,
so that readers can cut and paste, to experiment with my code?

I see many people doing it, but can see no FAQ or advice on how.
JimJ

to post a comment
CSS

10 Comments(s)

Copy linkTweet thisAlerts:
@GSZX1337Sep 28.2006 — <pre>&lt;a href=&quot;http://www.w3schools.com/&quot;

target=&quot;_blank&quot;&gt;Visit W3Schools!&lt;/a&gt;</pre>

Here's some sample code from W3Schools.
Copy linkTweet thisAlerts:
@JimJauthorSep 28.2006 — Thanks, GSZX1337,

but FF tells me

http://www.w3schools.com/&quot;

cannot be found. ?? !!

JimJ
Copy linkTweet thisAlerts:
@GSZX1337Sep 28.2006 — *points at "&quot;" *
Copy linkTweet thisAlerts:
@JimJauthorSep 28.2006 — Sorry, I'm no wiser.
Copy linkTweet thisAlerts:
@JimJauthorSep 28.2006 — I've found w3schools.

It sounds as tho my original query was too vague.

When replying to queries, some people know how to place sample code,

HTML or CSS in an inset 'box'.

Others readers can access that code easily, by cut and paste,

not having to retype it.

I hoped one of those people would tell me how.

Sorry for the confusion.
Copy linkTweet thisAlerts:
@CharlesSep 28.2006 — &lt;code style="border:solid 1px #a00; display:block; padding:1ex"&gt;&amp;lt;img alt="my logo" src="some-url.png"7gt;&lt;/code&gt;
Copy linkTweet thisAlerts:
@JimJauthorSep 29.2006 — <code style="border:solid 1px #a00; display:block; padding:1ex">

Testing Charles's Reply

</code>
Copy linkTweet thisAlerts:
@JimJauthorSep 29.2006 — What am I doing wrong?

I presumed I was meant to place my comments, code, images, URLs

withiin the <code> </code> tags.

Obviously not.
Copy linkTweet thisAlerts:
@JimJauthorSep 29.2006 — Thanks Charles,

That's great, tho it took me some time to realise

the section on vB code was the one I needed.

Thanks,

JimJ
×

Success!

Help @JimJ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...