Application of BR element and nobr element in Web page html

Source: Internet
Author: User
Web page

We are in the production of Web pages, we will encounter the content of text editing, and will certainly face the problem of line-wrapping. There are line-wrapping and spaces in HTML to resolve the line-wrapping problem. We have introduced a lot of knowledge about CSS in 52css.com, but we also need to have a good understanding of the basic HTML knowledge, so that we can create a high level of web pages, so that our standards more professional. In the face of such problems, we inevitably need to apply the BR element or nobr element. Let's look at the meaning and application of these two elements.

Br:

Inserts a line break.
Inserts a line feed character.
This is our most common line-wrapping method.
For HTML we can write:

If more standard, should write:

NOBR:

Renders text without line breaks.
Displays text without wrapping.
NOBR is available in the Internet Explorer 4.0 and above versions of HTML and scripts.
NOBR does not change the display.
The nobr element needs to close the label, that is, the pair appears.

About Line Wrapping:

At any point in the text, even anywhere on the page, you can insert a line-break label
Wrap. For example:

Webjx.com

CSS Web design

About not wrapping:

Sometimes the browser may be asked not to wrap normally, for example, the company name displayed is very long, or the label text is quite numerous. But also hope that the browser's display page is very narrow do not wrap, in order to achieve this goal, the word can not use the regular spaces, but to use a special line spaces. Spaces in HTML code is actually not a single character, it shows the effect of the same as the ordinary spaces, not a newline spaces is a label of a collation. We use a new tag entity (entity) to mark the spaces of a newline. Entities are used to represent special characters that are not easily represented in HTML code, and the format of the entity is "&xxxx", where "XXXX" is a string that identifies a particular entity, and a newline space is expressed as ". Netscape added another element: to prevent line-wrapping; But this label is only valid for Netscape.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.