HTML that doesn't turn into HTML...., Trying to display HTML for a layout... |
HTML that doesn't turn into HTML...., Trying to display HTML for a layout... |
seremela |
Oct 4 2006, 05:10 PM
Post
#1
|
Group: Members Posts: 2 Joined: 4-October 06 Member No.: 331 |
This is kind of difficult to explain! I want to do free layouts for this website, and need to have the HTML needed displayed on that page, but obviously if I write it as HTML it'll convert it so you can't see it as HTML...if you get me Is there a special kind of box or something that makes HTML visible on a webpage? Thanks!
|
Christian J |
Oct 4 2006, 05:16 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
|
Cameron |
Oct 4 2006, 05:17 PM
Post
#3
|
Novice Group: Members Posts: 28 Joined: 24-September 06 Member No.: 224 |
Tags can be done like this: <tag>. The tag (or whatever text you choose to type there) is in the middle of < and >, which makes it look like this in a browser: <tag>
Hopefully this helps. |
Christian J |
Oct 4 2006, 05:18 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
|
Cameron |
Oct 4 2006, 05:32 PM
Post
#5
|
Novice Group: Members Posts: 28 Joined: 24-September 06 Member No.: 224 |
Oops! Can't believe I missed that! Thanks ChristianJ!
Re-done comment below: Tags can be done like this: <tag>. The tag (or whatever text you choose to type there) is in the middle of < and >, which makes it look like this in a browser: <tag> Hopefully this helps. |
Darin McGrew |
Oct 4 2006, 05:50 PM
Post
#6
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Don't forget to encode ampersands as & (as explained by the FAQ).
|
seremela |
Oct 5 2006, 04:00 AM
Post
#7
|
Group: Members Posts: 2 Joined: 4-October 06 Member No.: 331 |
Thank you!
|
mikeea |
Oct 7 2006, 01:00 AM
Post
#8
|
Group: Members Posts: 4 Joined: 7-October 06 Member No.: 355 |
Just to be a smarty...
You could use a textbox and set the initial value of the box to be your coding. They could then copy your coding and paste it where needed. |
Darin McGrew |
Oct 7 2006, 11:36 AM
Post
#9
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
You could use a textbox and set the initial value of the box to be your coding. They could then copy your coding and paste it where needed. But you'd still need to encode special characters. Actually, depending on what you mean by "a textbox", you might need to encode quotes as " as well. |
SkyB0lt |
Oct 8 2006, 03:23 PM
Post
#10
|
Novice Group: Members Posts: 21 Joined: 27-September 06 Member No.: 253 |
Ok, I cant seem to get this perfected. It works fine in the page but then I cant seem to show the &code without the validator getting mad.
Here is my HTML code. <CODE>&lt;TAGUSED&gt;</CODE>.<BR><BR> This is cool, and to make the & sign show in the code i had to add the text amp before the lt. it is like this but put together. <CODE> & amp lt</CODE>. Notice the amp does not show. The validator says this Warning Line 238 column 8: cannot generate system identifier for general entity "amplt". What am I doing wrong? |
Christian J |
Oct 8 2006, 03:39 PM
Post
#11
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
What Darin meant was that if you want an ordinary ampersand ("&") to appear on a web page you should encode it as "&", otherwise a browser may interpret the "&" as the beginning of an entity ( such as "<", etc).
The validator complains because there is no entity like "&lt;". And while "&<" are two valid entities they are probably not what you want, since they will render as "&<". |
SkyB0lt |
Oct 8 2006, 03:43 PM
Post
#12
|
Novice Group: Members Posts: 21 Joined: 27-September 06 Member No.: 253 |
So how should I both make the validator happy and show the code?
Shawn |
Christian J |
Oct 8 2006, 04:38 PM
Post
#13
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Something like this perhaps:
CODE <P> Some text <P> ..which should render in your HTML example as: CODE <P> Some text </P> If you want to show the "&" entity in a code example you must write: CODE <P> Some text &amp; some more <P> ..which should render in your code example as: CODE <P> Some text & some more </P> Then when someone pastes the code example into his own HTML document, the text will render in a browser as Some text & some more |
SkyB0lt |
Oct 8 2006, 05:02 PM
Post
#14
|
Novice Group: Members Posts: 21 Joined: 27-September 06 Member No.: 253 |
Wow you are GREAT!!
I cant believe it was so easy! I was simply missing one thing in two places! ; was all that was missing. Wow coding is a pain. Thanks for the help your great! |
Lo-Fi Version | Time is now: 24th April 2024 - 11:02 PM |