Hello everyone,
I have a question regarding hyphenation:
I have just discovered that I can add a "soft hyphen" just by pressing "CRTL –" (before, I have always used the HTML code ­ to add a soft hyphen).
The new soft hyphen works correctly on the web page, but: It does not show up in the source code of the page (when I display the source code, there is just the word, without any hint that there is a hyphen inside the word). So how does the browser know that I added a soft hyphen there?
Thanks in advance! Malte
Adding soft hyphen
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
- wwonderfull
-
- Posts: 1567
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Adding soft hyphen
The browser is able to display the soft hyphen even though it is not visible in the source code because it is a hidden character that instructs the browser on where it can break the word if necessary for line wrapping. The soft hyphen character is part of the Unicode standard and is recognized by web browsers to allow for more flexible text layout. So even though you can't see it in the source code, the browser knows how to handle it when rendering the web page.heynen wrote: ↑Fri Mar 29, 2024 3:12 pm Hello everyone,
I have a question regarding hyphenation:
I have just discovered that I can add a "soft hyphen" just by pressing "CRTL –" (before, I have always used the HTML code ­ to add a soft hyphen).
The new soft hyphen works correctly on the web page, but: It does not show up in the source code of the page (when I display the source code, there is just the word, without any hint that there is a hyphen inside the word). So how does the browser know that I added a soft hyphen there?
Thanks in advance! Malte
Let's say you have a long word like "supercalifragilisticexpialidocious" in your webpage. If the word is too long to fit on one line and needs to be wrapped to the next line, the browser will typically break the word at spaces or hyphens. However, if you want to give the browser a hint on where it can break the word, you can insert a soft hyphen at a specific point.
For example, if you write "supercali­fragilisticexpialidocious" in your source code, the soft hyphen after "cali" indicates to the browser that it can break the word at that point if needed. So, if the word needs to be wrapped to the next line, the browser will break it as "supercali-" on one line and "fragilisticexpialidocious" on the next line.
Similarly, if you use the "CRTL –" shortcut to insert a soft hyphen, the browser will interpret it the same way, even though it may not be visible in the source code.
Re: Adding soft hyphen
Thank you for your insightful reply!