HTML Coding Rules : Rule 4

CSS


< link rel="stylesheet" type="text/css" href="all.css" />
< style type="text/css">@import “noNav4.css”;< /style>

The browser was created before the rise of CSS. What does this mean? Well, it means that old browsers won’t understand your CSS files. In fact some browsers, sorry I mean Netscape 4, will crash at the sight of CSS.

The first line will work for all browsers. Just keep in mind only CSS level 1 should be in this file. But on the second line, Netscape will ignore it because it does not understand the @import tag.

The idea is to build on top of your CSS code so all browser will render correctly.

But in reality, if you look at the browser statistics, you should be mainly concern with MSIE 6/7, Mozilla/Firefox, and Safari. Part of me still loves Opera, but it’s dead last on my list when I’m coding HTML.

All browsers have default settings and that’s the reason why MSIE and Mozilla renders each page differently. So in your CSS file, just reset the default settings and you’ll have consistency throughout each browser. Add this line to the top of you CSS file:


html, body, ul, ol, li, p,
h1, h2, h3, h4, h5, h6,
form, fieldset, a { margin:0; padding:0; border:0; }

via [HTMLTree]

HTML : Introduction

What is an HTML File?

  • HTML stands for Hyper Text Markup Language
  • An HTML file is a text file containing small markup tags
  • The markup tags tell the Web browser how to display the page
  • An HTML file must have an htm or html file extension
  • An HTML file can be created using a simple text editor
  • Let’s Try It?

    If you are running Windows, start Notepad.
    If you are on a Mac, start SimpleText.

    In OSX start TextEdit and change the following preferences: Open the “Format” menu and select “Plain text” instead of “Rich text”. Then open the “Preferences” window under the “Text Edit” menu and select “Ignore rich text commands in HTML files”. Your HTML code will probably not work if you do not change the preferences above!

    Type in the following text:


    < html>
    < head>
    < title>Title of page
    < /head>
    < body>
    This is my first homepage. < b>This text is bold
    < /body>
    < /html>

    Save the file as “mypage.htm”.

    Start your Internet browser. Select “Open” (or “Open Page”) in the File menu of your browser. A dialog box will appear. Select “Browse” (or “Choose File”) and locate the HTML file you just created - “mypage.htm” - select it and click “Open”. Now you should see an address in the dialog box, for example “C:\MyDocuments\mypage.htm”. Click OK, and the browser will display the page.

    via [W3Schools]

    Web Server Logfile Analysis and Page Tagging

    by Chubs

    webanalize.jpg


    In web analytics, two basic technological approaches are used to gather data for web analytics:

    • Web server logfile analysis - In this method, a program or a web log analysis software reads the logfiles (in which all web server transactions are recorded) in order to assess the popularity of the website. Page views and visits or sessions were once used as displayed metrics, but now, log analyzers use cookies to track visits.

    • Page tagging - In page tagging (also known as “Web bugs”), JavaScript on each page is used to inform a third-party server whenever a page is rendered by a web browser. Page tagging was developed due to concerns on the accuracy of logfile analysis in caching and because of the need to perform web analytics as an outsourced service.

    The Science of Web Analytics

    by Chubs

    webanal.JPG


    Getting your web site’s message across to users is the one thing that you as a web site owner should be wishing for and one technique to determine the factors which could affect the way web users view a particular web site is to study the behavior of these people. Web analytics attempts to explain the nature of the behavior of website visitors using the data gathered from a web site and by examining these data to see if which aspects of the web site had contributed to the attainment of the web site’s objectives. If for example you have a web site which sells products to users, web analytics can determine which aspects of your web site had encourage users to make a purchase. Web traffic reports, sales and lead information, e-mail response rates, user performance data, direct mail campaign data and other custom metrics are considered as essential information which are compared against key performance indicators to measure effectiveness.

    The Aspects of Web Design

    by Chubs

    background_mattwestphotography1.jpg


    Web design can be considered as a significant factor to increase the chances of your website achieving its purpose because a well designed website is more likely to become more effective in getting your users to understand what your website is created for. Effectiveness is the main driving force behind successful web designs and this can be measured based on different design concerns. Non-commercial web sites have varying objectives depending on their exposure and on their users’ response. Typical commercial web sites, on the other hand, are concerned with several aspects of design and these include: a) The content or information on the website; b) Usability; c) The appearance and style of the web site, and; d) Visibility. Knowledge of these basic aspects should improve the way your web site gets its users’ attention and response.

    Server-side Dynamic Content

    by Chubs

    request_model_on_the_server_side_large.png


    We have learned that the client’s computer generates the client-side dynamic content and that the web server retrieves the page and sends it back in its original form so that the web browser can process the code embedded in the page and can finally show the page to the user. On the other hand, server-side dynamic content works by, first, having the browser send an HTTP request to the server. Then, the server gets the requested script or program and executes it in order to output an HTML web page. Lastly, the server sends this HTML output to the client’s browser. Users claim that although server-side has a lot of potential for dynamic content, working on low-end, high-traffic machines can pose as a problem.

    Client-side Dynamic Content and Page

    by Chubs

    clientside.gif


    The client-side dynamic content comes from the client’s computer when the web server retrieves the page and sends it back as it is. Next, the web browser inputs the code embedded in the page and finally shows it to the user. Remember that some browsers do not support the language or all aspects of the language in a client-side dynamic page. Also, since the data cannot be stored anywhere but in the user’s computer, the data cannot be used for statistics gathering. Keep in mind that search engines cannot run client-side languages and crawl links created by them and that some users sometimes have scripting languages disabled in their browsers because of potential security threats.

    Navigation Interactivity in a Dynamic Web Page

    by Chubs

    dynamic.gif


    Contents on a dynamic web page like text, form fields, images can create navigation interactivity based on different situations or contexts. Basically, there are two techniques which can produce interactivity:

    • You can use client-side scripting to alter interface behaviors in a particular web page which can react to mouse or keyboard actions or at an indicated timing event. Through this, dynamic behavior happens within the presentation.

    • You can use server-side scripting to alter the given page source between pages, changing the sequence or reload of the web content or web pages supplied to the browser. Server responses may be based on conditions such as data in a posted HTML form, parameters found in the URL, the kind of browser used, the database or server state or the passage of time.

    Earn from your Web Site

    by Chubs

    moneyweb.gif


    Website owners and web developers have the opportunity to turn their websites into something profitable and they usually do this either by making: a) Content based sites, or web sites which get revenue by selling advertising space on their site, or; b) Product or service based sites wherein products or services are offered to users (the user is provided with a payment form on the site where he can enter his credit card number or input other payment information). These two methods can also be combined in order to derive revenue and this is normally done by online auctions web sites where they charge users for availing its auction service and also shows third-party advertisements.

    What are Static Web Sites?

    by Chubs

    staticpublishing.gif


    Static web sites have web pages saved on the server where users can view them. There are three main categories of software which are used in editing static web sites: a) Text editors like Notepad or TextEdit where HTML can be altered directly using the editor program; b) WYSIWYG editors like Microsoft FrontPage and Adobe Dreamweaver (known before as Macromedia Dreamweaver) which can edit the web site using a GUI interface and can automatically generate the underlying HTML, and; c) Template-based editors like iWeb and Rapidweaver wherein users can easily make and upload web sites to a web server even without any background in using HTML since they can always choose templates from the available palette and modify using pictures and text.