HTML/CSS Service

HTML Basics

Category: CSS 2 Tutorial    |    441 views    |    Add a Comment  |   

The DOCTYPE

When I first started researching HTML5 a few months ago, one of the main things I struggled to find was the doctype. A simple thing, you’d think it would be everywhere, but after much frustration, I finally found it buried within w3.org and here it is:

<!DOCTYPE html>

I was also curious why they chose to “html” rather than “html5?, it seemed like the logical way to tell a browser that the current document was written in HTML5, and offered a good template for the future. But I found that <!DOCTYPE html5> triggers Quirks Mode in IE6, and when taking backwards compatibility into consideration <!DOCTYPE html> is a pretty good choice (in my opinion).

Overall, I really like the new DOCTYPE; it’s small, meaningful, and maybe we’ll actually be able to remember this one by heart and not have to paste it from site to site.

New Elements you should know

At first glance, with HTML5, the new elements immediately jump out and command attention. The W3C really listened to the community and planned for the future when architecting the abundance of new elements available. We have everything from basic structural elements like <header> and <footer>to others like <canvas> and <audio> that tap into, what seems to be, a very powerful API which allows us the freedom to create more user-friendly applications while further distancing ourselves from reliance on Flash for saving data and intense animation.

The new structural elements
  • <header>
    The header element contains introductory information to a section or page. This can involve anything from our normal documents headers (branding information) to an entire table of contents.
  • <nav>
    The nav element is reserved for a section of a document that contains links to other pages or links to sections of the same page. Not all link groups need to be contained within the <nav> element, just primary navigation.
  • <section>
    The section element represents a generic document or application section. It acts much the same way a <div> does by separating off a portion of the document.
  • <article>
    The article element represents a portion of a page which can stand alone such as: a blog post, a forum entry, user submitted comments or any independent item of content.
  • <aside>
    Aside, represents content related to the main area of the document. This is usually expressed in sidebars that contain elements like related posts, tag clouds, etc. They can also be used for pull quotes.
  • <footer>
    The footer element is for marking up the footer of, not only the current page, but each section contained in the page. So, it’s very likely that you’ll be using the <footer> element multiple times within one page.

When you take a look at these new elements, it looks like they’re just replacing our common DIV IDs; and in a way, it’s true. But, the diagram below shows that elements like <header> and <footer> can be used more than once on a single page where they behave more like classes and normal HTML elements that you can use over and over again to retain a semantic structure.

 

Elements like <header> and <footer> are not just meant to represent the top and bottom of the current document, but they also represent the <header> and <footer> of each document section, much the way we use <thead> and <tfoot> in data tables.

The benefits of using these structural elements is mainly due to the fact that they are extremely well defined and provide a great way to semantically structure your document. However, these elements do need to be used with some careful thought because they can, very easily be overused.

Share/Save/Bookmark

 

HTML5 New elements

Category: CSS 2 Tutorial    |    755 views    |    Add a Comment  |   

HTML 5 (HyperText Markup Language Version 5) is the next major revision of the core language of the World Wide Web, HTML. HTML 5 specifies two variants of the same language, a “classic” HTML (text/html) variant known as HTML5 and an XHTML variant known asXHTML5.

The following is a cursory list of differences and some specific examples.

  • New parsing rules oriented towards flexible parsing and compatibility
  • New elements – sectionarticlefooteraudiovideoprogressnavmetertime
    asidecanvasdatagrid
  • New types of form controls – dates and times, emailurlsearch
  • New attributes – ping (on a and area), charset (on meta), async (on script)
  • Global attributes (that can be applied for every element) – idtabindexhidden
  • Deprecated elements dropped – centerfontstrike, frames

Share/Save/Bookmark

 

Learn HTML5

Category: CSS 2 Tutorial    |    1,713 views    |    Add a Comment  |   

HTML 5 introduces new elements to HTML for the first time since the last millennium. New structural elements include asidefigure, and section. New inline elements include timemeter, and progress. New embedding elements include videoand audio. New interactive elements include detailsdatagrid, and command

Even well-formed HTML pages are harder to process than they should be because of the lack of structure. You have to figure out where the section breaks go by analyzing header levels. Sidebars, footers, headers, navigation menus, main content sections, and individual stories are marked up by the catch-all div element. HTML 5 adds new elements to specifically identify each of these common constructs:

  • section: A part or chapter in a book, a section in a chapter, or essentially anything that has its own heading in HTML 4
  • header: The page header shown on the page; not the same as the head element
  • footer: The page footer where the fine print goes; the signature in an e-mail message
  • nav: A collection of links to other pages
  • article: An independent entry in a blog, magazine, compendium, and so forth
his new version of HTML—usually called HTML 5, although it also goes under the name Web Applications 1.0—would be instantly recognizable to a Web designer frozen in ice in 1999 and thawed today. There are no namespaces or schemas. Elements don’t have to be closed. Browsers are forgiving of errors. A p is still a p, and a table is still a table. Read more…

Share/Save/Bookmark

 

HTML5 tutorial

Category: CSS 2 Tutorial    |    2,057 views    |    Add a Comment  |   

This new version of HTML—usually called HTML 5, although it also goes under the name Web Applications 1.0—would be instantly recognizable to a Web designer frozen in ice in 1999 and thawed today. There are no namespaces or schemas. Elements don’t have to be closed. Browsers are forgiving of errors. A p is still a p, and a table is still a table.

At the same time, this proverbial unfrozen caveman Web designer would encounter some new and confusing elements. Yes, old friends like div remain, but now HTML includes sectionheaderfooter, and nav as well. emcode, and strong are still present, but so are metertime, and mimg and embed continue to be used, but now there are video and audio too. However, closer inspection by the caveman designer would reveal that these elements aren’t that different. Many of them might be things the designer needed back in 1999 but didn’t have. All these new elements are easily learned by simple analogy with elements the designer already understands. In fact, they’re a lot easier to learn than Ajax or CSS.

Share/Save/Bookmark

 

CSS Inheritance

Category: CSS 2 Tutorial, CSS Examples    |    929 views    |    1 Comment  |   

 

CSS inheritance is automatically defined by the style property used. In other words, when you look up the style property background-color, you’ll see a section titled “Inheritance”. If you’re like most Web designers, you’ve ignored that section. But it does serve a purpose.

What is CSS Inheritance?

Each element in an HTML document is part of a tree, and every element except the initial <html> element has a parent element that encloses it. Whatever styles are applied to that parent element can be applied to the elements enclosed in it if the properties are inherited.

For example, this HTML has an H1 tag enclosing an EM tag:

 

<h1>This is a <em>Big</em> Headline</h1>

The EM element is a child of the H1 element, and any styles on the H1 that are inherited will be passed on to the EM text as well. For example:

h1 { font-size: 120%; }

Since the font-size property is inherited, the “Big” text will be 120% in size as well as the rest of the H1.

How to Use CSS Inheritance

The easiest way to use it is to become familiar with theCSS properties that are and are not inherited. If the property is inherited, then you know that the value will remain the same for every child element in the document. Read more…

Share/Save/Bookmark

 

Difference Between CSS and XSLT

Category: CSS 2 Tutorial, CSS Tips    |    649 views    |    3 Comments  |   

 

Cascading Style Sheets or CSS were developed a few years ago to define the look and feel of markup languages. Extensible Style Sheet Language for Transformations or XSLT were created to transform documents. They are both style sheets, but they serve vastly different purposes.

What CSS Can Do

  • Modify the font size, color, family, and style of text in markup
  • Define the location and size of an element
  • Change the background image and color of elements
  • Create a new look and feel for markup pages to display on the Web

 

What CSS Cannot Do

  • Change the order of elements in a document
  • Make computations based on the content of the document
  • Add content to the document
  • Combine multiple documents into one

 

XSLT is a powerful language for transforming documents. It was created to allow developers the ability to create data and then transform it to various different formats. It is meant to keep the distinction between content and design separate. Read more…

Share/Save/Bookmark

 

The ASCII Chart

Category: CSS, CSS 2 Tutorial    |    332 views    |    Add a Comment  |   

What is an ASCII chart?

An ASCII Chart is a simple way to keep a list of what all the printable, or displayable characters are. All computers store information as a set of 1’s and 0’s (bits), not as actual characters. A group of eight (8) bits make a byte. Believe it or not, four bits actually make a nibble and two nibbles make a byte. Pay attention, there is going to be a test on this. ;-)

To keep things simple, if you count from 0 up to 254, here are some milestones:

  • 32 is a space
  • 48 to 57 are our numbers 0-9
  • 65 to 90 are the capital letters A-Z
  • 97 to 122 are the lowercase letters a-z

There is method to this madness. Ever wonder why things sort the way they do on your computer? It is really a numerical sort, but not using numbers the way we use them! That is why on many systems, this would be considered sorted:

Read more…

Share/Save/Bookmark

  • No Related Post

 

How To Create Columns With Div’s

Category: CSS, CSS 2 Tutorial    |    940 views    |    Add a Comment  |   

The <div> tag can be defined as the division in a web page. It is a block level element. This implies that the default behavior of div’s is to stack up one above the other. This serves the purpose of using div’s for a simple web page layout where all the elements stack one above the other. When we have a columnar web page layout (which happens to be the most common layout for majority of the websites), we need to know how to use div’s to create two or more columns in a web page. 

The following method will cause div’s to stack up side by side rather than one above the other. 

Let’s say that we have two div’s: 

<div id=”div1″></div> 
<div id=”div2″></div> 

Now, in the stylesheet declare the following rules. 

#div1 { float:left; width:50%;} 
#div2 { margin-left:50%; width:50%;} 

The result will be two columnar div’s. You may use this method to create as many columns as needed on the web page. 

Now, if you need these two columnar div’s to expand vertically equal to each other you can use the following method. 
Read more…

Share/Save/Bookmark

  • No Related Post

 

mage and its Alt Text Roles in Effective SEO

Category: CSS, CSS 2 Tutorial    |    355 views    |    Add a Comment  |   

 

It is Very easy to insert images into your HTML documents. Followings are the example how to insert an image into your web page and also set its properties.

<Img Src=”your_url_image_file_name” width=”#” Height=”#” border=”#” Alt=”enter your  keywords here” align=”#”>

Where:
Src = location of  image file
Width = wide of horizontal
Height = high vertically
Border = set border size to become image frame
Alt = text to emerge in the place of if image do not loaded
Align = arrangement of image align ( left, right, top, middle, bottom).

There is no difference in src attribute when you want to use animation on your web page.
Also, you need to know how to set an image to become an image link. Read more…

Share/Save/Bookmark

  • No Related Post

 

Link/Anchor and its Role in Effective SEO

Category: CSS, CSS 2 Tutorial    |    714 views    |    1 Comment  |   

Link is often recognized with term “ hyperlinks“, enabling an object/string in your documents for being clicked. At the time of the objects/strings being clicked will open a new document on your web page. Also, a link can be used to link at a downloadable files.

It is easy to make a link from an image or a text. Link tag is early with < A> . < A> tag is used by HTML to make a link to another document in web, including zip files to make a downloadable files, while its attributes, href is used to define link location.
There are 4 types of links:

Relative link 
Absolute link 
Link to e-mail 
Link in the same document

Both relative and absolute link can be used to make downloadable files. All you have to do is Zip your files. You will need WinZip program to do this. If you do not have it yet, please download it now from their site.
This program will help you to compress your files size too. Hence, after zip your file with WinZip, you will have *.Zip files extension.

Read more…

Share/Save/Bookmark