473,809 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showing the html?

Hello,

I am trying to create the html that someone would copy and paste to create a
link to our site. I want them to see the entire code and wrote the following
html:

<p>&lt;p>&lt; a href="http://www.mysite.com" Usability, User Interface
Design, &amp; Ergonomics &lt;/a>
- Internet Resources &amp; Consulting by Usernomics.&lt;/p>
</p>

This works fine except for the "&". I want the "&amp;" to show rather than
"&".
Can someone tell me what I have to do to permit the "&amp;" to show?

Thanks,

Bob
Mar 15 '07 #1
5 2314
Els
Hymer wrote:
Can someone tell me what I have to do to permit the "&amp;" to show?
&amp;amp;

:-)

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Shabby Tiger - Slow Down
Mar 15 '07 #2
Scripsit Hymer:
I am trying to create the html that someone would copy and paste to
create a link to our site.
If you don't know that, and you don't know how to check authoritative
specifications on such matters, is your code really worth copying?
<p>&lt;p>&lt; a href="http://www.mysite.com" Usability, User Interface
Design, &amp; Ergonomics &lt;/a>
- Internet Resources &amp; Consulting by Usernomics.&lt;/p>
</p>
This raises many questions. Why do you use paragraph markup for something
that is not a paragraph, or even a complete sentence? Why should people who
copy the code use paragraph markup? Why the leading and trailing spaces in
the link text? (The latter probably has an impact on rendering.) Why do you
use the ASCII hyphen-minus character and not a dash character?

And why do you misrepresent the content of http://www.mysite.com ? Did you
even check what it is?
This works fine except for the "&".
For some odd values of "work".
I want the "&amp;" to show rather than "&".
Why? It might actually confuse people. It is true that it is generally
advisable (and obligatory in XHTML) to "escape" any occurrence of "&" as
data character, but a) your code isn't exemplary anyway, b) if people really
need your help to set up a simple link, they might get confused with
"&amp;", and c) an "&" when followed by a space works well in browsers (and
by classic HTML rules).

But yes, you _can_ make "&amp;" to show by writing e.g. "&amp;amp;" or (if
that confuses _you_) alternatively "&amp;".

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 15 '07 #3
>
>I am trying to create the html that someone would copy and paste to
create a link to our site.

If you don't know that, and you don't know how to check authoritative
specifications on such matters, is your code really worth copying?
><p>&lt;p>&lt ;a href="http://www.mysite.com" Usability, User Interface
Design, &amp; Ergonomics &lt;/a>
- Internet Resources &amp; Consulting by Usernomics.&lt;/p>
</p>

This raises many questions. Why do you use paragraph markup for something
that is not a paragraph, or even a complete sentence? Why should people
who copy the code use paragraph markup? Why the leading and trailing
spaces in the link text? (The latter probably has an impact on rendering.)
Why do you use the ASCII hyphen-minus character and not a dash character?

And why do you misrepresent the content of http://www.mysite.com ? Did you
even check what it is?
>This works fine except for the "&".

For some odd values of "work".
>I want the "&amp;" to show rather than "&".

Why? It might actually confuse people. It is true that it is generally
advisable (and obligatory in XHTML) to "escape" any occurrence of "&" as
data character, but a) your code isn't exemplary anyway, b) if people
really need your help to set up a simple link, they might get confused
with "&amp;", and c) an "&" when followed by a space works well in
browsers (and by classic HTML rules).

But yes, you _can_ make "&amp;" to show by writing e.g. "&amp;amp;" or (if
that confuses _you_) alternatively "&amp;".

OK Jukka, you have taken me to task. As you can see, I don't know html very
well. Of course, that's why I asked the question, albeit the wrong one.

While I don't know the correct coding, the user will probably know even
less. I would like to get the correct coding to offer that person to make it
easy to copy/paste.

Can you suggest the correct coding for this purpose?

Thanks,

Bob

P.S. I did not check mysite. Sorry. I was just trying to not publicize my
URL inappropriately .
Mar 16 '07 #4
On Mar 15, 9:20 am, "Hymer" <ergobob@soni c[REMOVE].netwrote:
Hello,

I am trying to create the html that someone would copy and paste to create a
link to our site. I want them to see the entire code and wrote the following
html:
here is a simple solution [but requires js]-

<p id="insHere">En able JS $=( </p>

<script type="text/javascript">
ELEM=document.g etElementById(" insHere")
TeXt='<p><a href="http://www.mysite.com" Usability, User Interface
Design, & Ergonomics </a- Internet Resources & Consulting by
Usernomics.</p>';
if(ELEM.textCon tent===undefine d)
ELEM.innerText= TeXt
else
ELEM.textConten t=TeXt
</script>

Mar 16 '07 #5
Scripsit sc************* @gmail.com:
here is a simple solution [but requires js]-
Well, the original question was ill-advised (someone is trying to give
others instructions on putting stuff on their pages without knowing HTML),
but that's not really an excuse for getting that nasty.

Maybe bogus questions deserve bogus answers, but this time, the question
wasn't bogus. The person is just trying to do something that shouldn't be
doing.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 16 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7334
by: Vishnu | last post by:
I have a strange problem on WindowsXP proffessional with IE6 ,when i try to display a tiff file ,it is not showing ,small red x is comming up. I tried by dowloading latest IE from microsoft but no use. This is working fine on win2k IE6 Here is the html file I am using to display the tif file <html> <head>
2
3099
by: Alex Rybalov | last post by:
Hi, Using IIS 5.0 and sometime some asp pages (absolutely randomly) showing as blank white pages. So far only one way of fixing it - restart whole server. Restarting IIS, or specific web server not helping, only whole server. I enable server side and client side debugging, but no errors showing up...
2
2227
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups of searchable fields in the fields 3. Each group can be expanded/collapsed by clicking on a link "(Fewer|More) Options" which sits right next to the group title.
2
2452
by: Tor Inge Rislaa | last post by:
Showing an HTML file in part of a Webform Hi I have a Webform with some buttons on the left side of the form. What I want when clicking one of the buttons is to show an HTML document in a part of the Webform (as if it was a Frame page). Any suggestions? (I am an VB programmer) T.I.Rislaa
10
2165
by: bessington | last post by:
hey all, i'm having a rather bizarre problem.. the image tag i have declared in my xhtml is not showing in safari / konqueror but showing just fine in Firefox, IE, Opera... this is a complete mystery and I have been scouring every book / resource I can find but haven't come up with an answer. any one have any ideas? all other images in site showing fine - but they are declared as background images in the css. the site is:...
7
1803
by: tshad | last post by:
I have a page that is showing as: Page.IsValid = False on postback when my submit button is pressed but none of my Validators have fired so there is no error message. How do I find out what is making the Page invalid? Thanks,
1
5584
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web tools do not have the ability to stay active. As you switch from tool to tool the previous information is lost unless you use a Back button. I need to place multiple div layers with I frames in them that can be shown or hidden based on selection. The...
5
3755
by: John Kotuby | last post by:
Hi all, This is my first time trying to creaet and use a custome Web Control in a Web Site project in ASP.NET 2.0 with VS 2005 and VB. I created the control in a separate Web Control Library project. The original code for that control was written in VS 2003 for .NET 1.1. I created a Web Project and pulled the VB module into the project. I compared the syntax to the VB template classs that was built and it looked very similar. I then...
5
3050
by: sitko | last post by:
Hi, I'm done a little HTML here and there over the years...but nothing professionally. Now I'm working on a project which calls for some simple HTML. Here is my markup, for the life of me I can't figure out why the chart borders aren't showing up. <html><body> <table border=”1”> <tr> <td>Measurement locations</td><td>Description</td><td>elapsed time, </td><td>Data: Dock A (AFF) </td><td>Model: min. T_mix</td><td>Model: ...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10635
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.