Tag: css

"hello world" javascript in LinuxBy David J Selden-Treiman

JavaScript is often useful for website design. It can allow you to dynamically generate content for individual visitors. You can load content dynamically using AJAX. You can create animations that may increase the effectiveness of your website.

However, JavaScript has some drawbacks too.

1. Increased Loading Time

In order for your JavaScript to be loaded by your visitors’ browsers it will need to be downloaded to their computer. This increases the amount of time required to load your webpage.

If you have a very fast internet connection, this may seem insignificant. JavaScript files are often smaller than 100kB, and on a modern wireless or Ethernet connection it will load in less than a second.

However, not all visitors to your website will have a fast internet connection. Some may living in remote locations with slow internet connections. Remember dialup? Some internet connections haven’t gotten much faster than that.

Your webpage may also downloaded by people on mobile devices. While cellphone data connections are getting faster, in many areas, especially in rural parts of the world away from cities, internet connections are still slow. If you use JavaScript on your website, your visitors on these connections will have to wait for it to download.

2. Increased Waiting Time

After your JavaScript has loaded, your visitors’ computers will need to execute your code. If you are using a fast, modern computer, your browser can probably perform your JavaScript quickly and easily.

However, not everybody uses a developer-level computer. Some people use computers that will require a significant amount of time to even start up a browser.

If your JavaScript requires a large amount of time to complete, visitors with slower computers will need to wait… and wait… for your JavaScript to be performed. This may even prevent them from using their computer in other ways.

Having to wait can greatly decrease the quality of these visitors’ experience.

3. Different Implementations

Just like CSS is implemented differently on different computers by different browsers, JavaScript is executed differently depending on the visitors’ machine. This can cause your JavaScript to not work or even make your website unusable.

In general, there are commonly agreed upon standards for how portions of code should be executed. However, not every browser agrees to follow all of the rules. Internet Explorer has historically failed to accept web development standards, causing problems for web developers. (But, thankfully for developers, Microsoft has been getting better about complying with them.)

In addition to browser differences, your code will likely need to operate differently depending on each visitors’ individual machine. Windows, Mac OS, Linux, iOS, Android, and other operating systems all have slightly different (or some times very different) ways of displaying website content.

To compensate for these differences, you will need to design your JavaScript to work with all of these different OSs.

In addition, your JavaScript will need to work with different screen sizes. If you have JavaScript that influences an image that it assumes is 500px by 500px, and a visitor’s screen decreases the size of the image, your JavaScript may not work as you intended. It may harm the appearance of the image or even make the entire page unusable.

Because of the complexity of implementing JavaScript for different browser, OS, and machine configurations, it is usually easier to use alternatives, such as CSS, where possible.

Tags: , , ,

Back to Basic – CSS

By Wan Woo

Cascading Style Sheets-CSS in short-is the most hottest word in web page design world, it basically give you creative control over the layout and design of your web pages, by using CSS, you can dress up your text with eye-catching headings, drop caps, and borders, just like the those you see in magazines or newspapers.

What’s more, you can also create columns and banners, highlight those text links of your choice as well as arrange images with precision.

If you’ve used styles in word processing programs like Microsoft Word or page layout programs like Adobe, CSS is nothing alien to you. A style is simply a set of rules instruct the computer how to format a particular portion of a web page. A style sheet is a set of these styles.

CSS works well with HTML, but you don’t confuse with HTML, CSS is not HTML, it’s a different language altogether. In short, CSS works hand-in-hand with the web browser to make HTML look great.

If you are old enough to surfed the web before 1995, then you will aware those website without CSS, as web designers were limited to the layout and styling options of HTML. HTML still forms the foundation of all pages on the World Wide Web, but it’s simply not a design tool. Sure, HTML provides basic formatting options for text, images, tables, and other web page elements, and patient, meticulous webmasters can make pages look pretty good using only HTML. But the result is often sluggish web pages laden with clunky code.

So with CSS, the benefits are obvious:-

  1. Style sheets offer far more formatting choices than HTML. With CSS, you can format paragraphs as they appear in a magazine or newspaper (the first line indented and no space between each paragraph, for example) and control the leading (the space between lines of type in a paragraph).
  2. When you use CSS to add a background image to a page, you get to decide whether and how it tiles (repeats). HTML can’t even begin to do that.
  3. Even better, CSS styles take up much less space than HTML’s formatting options, such as the much-hated tag. You can usually trim a lot of kilobytes from text-heavy web pages using CSS. As a result, your pages look great and load faster.
  4. Style sheets also make updating your site easier. You can collect all of your styles into a single external style sheet that’s linked to every page in your site. In short, you can completely change the appearance of a site just by editing a single style sheet.

Software for CSS

To create web pages made up of HTML and CSS, you only require a basic text editor like Notepad for Windows or Text Edit for Mac. But of course, there are other better programs written solely for web pages design. So some of the commonly used free or paid programs are: -

  1. jEdit (Windows, Mac, Linux) – This free, Java-based text editor works on almost any computer and includes many features that you’d find in commercial text editors, like syntax highlighting for CSS.
  2. HTML-Kit (Windows). This powerful HTML/XHTML editor includes lots of useful features like the ability to preview a web page directly in the program (so you don’t have to switch back and forth between browser and editor), shortcuts for adding HTML tags, and a lot more. By the way, this is also free.
  3. skEdit (Mac) – This is the most expensive web page editor I even find. However, this program come with complete FTP/SFTP, code hints, and other useful features.
  4. Coda (Mac) – This is a full-featured web development toolkit. It includes a text editor, page preview, FTP/SFTP, and graphic CSS-creating tools for creating CSS.

In Summary, whether you are programmers or internet surfers, CSS is definitely change the ways you design and read any of the web pages now and future. Hence, it is always good for you to know the basic understanding of CSS.

The author is freelance article writer for nearly 3 years. He is not only specialize in man fashion, you can also check out his latest website at http://www.industrialwaterpumps.org/ which provide best deals and full reviews of Industrial Water Pumps for commercial as well as private usage.

Tags: ,
Back to top