Just as you will want to break some text into discrete chunks, at other times you will want to keep text together. For example, you wouldn’t want words separated in dates (December 25, 2003), awkward phrases that include letters and numbers (24 hours), or in some company names (“International Business Machine Corporation”).
Suppose you were to use the phrase “12 Angry Men.” You would not want a browser to split the “12” and “Angry” across two lines, as shown here:A good example of this technique appears in the movie “12 Angry Men.”
In cases where you do not want the client browser to break text, you should use a nonbreaking space entity ( ) instead of a normal space. For example, when coding the “12 Angry Men” paragraph, you would use something similar to the following code:<p>A good example of this technique appears in the movie“12 Angry Men.”</p>
The browser will then be forced to keep the phrase together, treating it as one cohesive word.
Nonbreaking spaces have long been used to force formatting on the client browser. For example, to indent a line by three spaces, HTML coders would use something like the following: Indented by three spaces
Before robust CSS styles, this was the only way to “space fill” text. However, now that there are a myriad of ways to achieve this result using styles, this technique becomes sloppy and should not be used. Instead, create an appropriate style and use it to achieve the same results.
HTML Related Interview Questions
|XML Interview Questions||HTML 4 Interview Questions|
|HTML Interview Questions||HTML 5 Interview Questions|
|HTML DOM Interview Questions||Java Interview Questions|
|CSS Interview Questions||Java Abstraction Interview Questions|
|Dynamic HTML Interview Questions||XHTML Interview Questions|
Introducing The Web And Html
What Goes Into A Web Page?
Starting Your Web Page
Lines, Line Breaks, And Paragraphs
Page Layout With Tables
Introducing Cascading Style Sheets
Creating Style Rules
Padding, Margins, And Borders
Colors And Backgrounds
Tables Table Styles
Defining Pages For Printing
Dynamic Html With Css
Introduction To Server-side Scripting
Introduction To Database-driven Web Publishing
Creating A Weblog
Introduction To Xml
Xml Processing And Implementations
Testing And Validating Your Documents
Choosing A Service Provider
Uploading Your Site With Ftp
Publicizing Your Site And Building Your Audience
Maintaining Your Site
The Web Development Process
Developing And Structuring Content
Designing For Usability And Accessibility
Designing For An International Audience
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.