JavaScript video tutorial – 19 – Javascript white space and line break

JavaScript white space and line break : If we have more than one white space in a string, then browser collapses all the white spaces to single white space. Hence to add more than one white space in between words or characters we use html entity ampersandnbsp;. ampersandnbsp;. indicates non breaking white space, which adds single space. We can use ampersandnbsp;. any number of times to add more white spaces. HTML br tag in JavaScript Code: To add line break we can use html br tag in a string. html br tag moves the cursor to next line so that from their on next content can be placed or written. Note: For spreading a long string to multiple lines end lines by \ Example Code: <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <title>Jav

Continue reading “JavaScript video tutorial – 19 – Javascript white space and line break”

It's only fair to share...Tweet about this on TwitterShare on FacebookShare on TumblrShare on Google+Digg thisShare on LinkedInPin on PinterestShare on VKShare on RedditPrint this pageEmail this to someone
Flattr the authorShare on StumbleUponShare on YummlyBuffer this page