www.webdeveloper.com
Results 1 to 4 of 4

Thread: HTML Experts: Is there is a special or secret way to use HTML while designing a webpa

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    HTML Experts: Is there is a special or secret way to use HTML while designing a webpa

    HTML Experts: Is there is a special or secret way to use HTML while designing a webpage?

  2. #2
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,478
    Hi there Malcolmjean,

    and a warm welcome to these forums.

    Well, I start with a valid document...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <title>Untitled Document</title>
    
    <style type="text/css">
    
    </style>
    
    <script type="text/javascript">
    (function() {
       'use strict';
    
    function init(){}
    
       window.addEventListener?
       window.addEventListener('load',init,false):
       window.attachEvent('onload',init);
    
    })();
    
    </script>
    
    </head>
    <body>
    
    <div>
    
    </div>
    
    </body>
    </html>
    ...and methodically code from the top left to the bottom right.

    At pertinent points in this process, I check the validity of the code here...

    ...and for cross-browser compatibility in my test browsers...
    • Firefox 18.0
    • IE 9
    • Chrome 24.0
    • Opera 12.12
    • Safari 5.1.7


    coothead

  3. #3
    Join Date
    Mar 2012
    Posts
    1,834
    I use position: absolute; in the CSS for DIVs. The title is quite misleading, the position is actually relative to the containing DIV, and is very useful for sites that you want to adjust automatically to different screen sizes.

    Also, I'd suggest that you still need to test your web pages on IE8. This is particularly so if you are coding in HTML5. IE8 does not understand the new bits in HTML5 so you need to ensure that the page degrades gracefully.
    Last edited by jedaisoul; 01-23-2013 at 12:50 PM.

  4. #4
    Join Date
    Aug 2012
    Location
    Tucson
    Posts
    45
    I think that all aspiring Web authors should at least start off coding Markup by hand - it is the only way to truly master the language. I also think that validating Markup and Style Sheet coding is very important for producing fully interoperable and standards compliant web pages.

    The essentials:

    Employ standards compliant HTML Markup
    Use a Text Editor and Code Markup by hand
    Use Strict Doctypes in order to preclude deprecated elements/attributes and avoid quirks mode serving
    Use HTML in preference to XHTML
    Check and correct Markup syntax constantly - use Tidy utility
    Structure pages correctly - correct nesting and well-formed
    Use Header elements (H1 -- H6) correctly for Creating Semantic Structure
    Avoid using Tables for page Layout - If you must, check Accessible Tables for layout
    Use UTF-8 character encoding
    Include meaningful ALT text for all images - or explanatory adjacent text
    Use W3C Markup Validation Service to insure correct function in all User-Agents
    Use externally linked Style Sheets for page layout/presentation
    Use W3C CSS Validation Service to insure correct page display and function.
    Be prudent in the use of scripting languages - use them to manage content rather than for presentation effects. Keep in mind client-side scripting in particular slows down page loading.


    Validation:

    Validation enhances Interoperability -- correct rendering in all user agents. However, web pages can, and do, fail validation and still display pretty much as expected in graphical Browsers anyway due to their built-in Markup discrepancy compensation -- thereby relying on the often unreliable error correcting properties of individual graphical Browsers. Validation does catch many easily corrected Markup errors and the resultant code is consequently easy to maintain or change. Pages containing invalid Markup may not display or function correctly in Screen Readers, BRAILLE interpreters and Textual Browsers or when incorporated into other applications. As we move toward the Semantic Web, the rigors of XML will result in a greater requirement for Valid Markup. Valid and well formed Markup also bespeaks careful craftsmanship and that appeals to many web authors.

    And .....

    You Can't Get Every Page to Look Identical, So Stop Trying!

    Remember that it is the quality and usefulness of the content and the ease of navigation through it that are of the greatest importance to most web page users.

    James

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles