Skip to content

How to Start with HTML for Website Design?

how-to-start-with-HTML-for -website-design

HTML Website Design, Much of HTML 5’s feature set involves JavaScript APIs that make it easier to develop interactive web pages but there is a slew of new elements that allow you extra semantics in your conventional Web 1.0 pages. In order to investigate these, let’s look at marking up a blog.

Firstly what we’ll do is use the header, footer, main and nav elements to mark up the broad structure of the page. Doing this will make your site more accessible to real people who use some assistive technologies.

Next, we’ll make the blog comments form much smarter by using the new data types and built-in validation available in HTML 5-aware browsers.

Then we’ll do some work on the guts of the page, using HTML 5’s elements to better mark up blog posts and comments and show how to use the sectioning elements to better structure accessible hierarchical headings on sites that are CMS-driven. As blogs are chronologically ordered, we’ll see what HTML 5 offers us for representing dates and times.

HTML Website Design in India

So take the phone off the hook, and make a cup of tea and we’ll get started.

 

 Start with HTML for Website Design
HTML 5, when used as plain HTML rather than its XHTML 5 sibling doesn’t need a DOCTYPE. But all browsers do, otherwise, they go into Quirks mode, which you don’t want: the collision of HTML 5 and Quirks mode is like matter and anti-matter meeting, and will cause a negative reality inversion that will make your underwear catch fire.

You’ve been warned, so at the top of your document, you need the line <!DOCTYPE html>.

Some sites “use” HTML 5, when in actual fact all they’ve done is take their existing code and change the DOCTYPE. That’s fine and dandy if you’ve been using valid, semantic code as HTML 5 is very similar to valid HTML 4.01. Eric Meyer mentions small differences like “not permitting a value attribute on an image submit”, and there are a few differences between the languages, summarized in the document HTML 5 differences from HTML 4. Start with HTML.

CSS Website Design in India

However, I don’t want simply to rebadge my existing code but to use some of the new structural elements now.

The overall aim is to replace this structure: with this: It’s a simple matter to change the HTML divs into the new elements. The only difficulty I had was deciding which element to use to mark up my sidebar, as it also includes a search field and “colophon” information as well as site-wide navigation. I decided against the element, as the spec says it “represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content”, but it’s nevertheless content rather than navigation. So I decided to go for the element as the closest fit.

HTML-CSS-JavaScript
I’ve wrapped the main content in an <main> element, which maps to the ARIA role=main so that the screen readers and other assistive technologies can easily find the main content. Note that you should only use this element once per webzguru page.

Table of Contents