Jump to content

How to handle parentheses in the text


htmlnewbie23

Recommended Posts

I searched the forum but nothing came up for how to handle parentheses in the text.I ask because in the very basic text editor I use to write my html, whenever my cursor lands on part of text that has parentheses, one of the two parentheses lights up in red. That usually signifies an error of some sort. So, when my text includes something like "..... this is a hypothetical (just for the same of argument) condition ......" is there a special way I should handle the "(" or ")" in html or xhtml?Thank you.

Link to comment
Share on other sites

No there's not. The editor is highlighting the other paren because it is showing you which one matches the one you have selected. If I write a function like this:

function funcName() {  ...}

And I put my cursor where the | is:

function funcName() |{  ...}

my editor will highlight the matching } to show me which closing bracket matches the opening one I'm looking at. It's doing the same thing with parentheses, it doesn't mean it's an error.

Link to comment
Share on other sites

Yes, the parenthisis "(" and ")" characters do not have to be specially defined as an entity in HTML. However, there are several characters that do need to be written so, because they are part of the HTML syntax. For example, the greater than nad less than < > symbols specify a HTML tag, and so to be displayed properly have to be written < >For a full reference of all character entities, you can go to http://www.w3schools.com/tags/ref_entities.asp .

Link to comment
Share on other sites

Yes, the parenthisis "(" and ")" characters do not have to be specially defined as an entity in HTML. However, there are several characters that do need to be written so, because they are part of the HTML syntax. For example, the greater than nad less than < > symbols specify a HTML tag, and so to be displayed properly have to be written < >For a full reference of all character entities, you can go to http://www.w3schools.com/tags/ref_entities.asp .
Thanks. I knew about the others, but could not figure out why it was highlighting the parentheses.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...