Small Logo
Hammockweb
Attributes and Basic Layout of an HTML Document

Hammockweb Logo Hammockweb Logo

Header Image

Tags, Attributes and Basic Layout of HTML Documents
Apr 06 2016

HTML is a markup language which stands for Hyper Text Markup Language. It was invented by Sir Timothy Berners-Lee in 1990s. HTML documents are simple text files with markup tags also called HTML tags. These markup tags are used to describe the content of a document and mostly come in pairs to indicate the start and end of a piece of content. In addition, some HTML tags also support attributes that pass further information to web browser. The syntax of attribute consists of the attribute name followed by the equal to (=) sign and a value enclosed in either single or double quotes. Attributes are always specified in the start tag. A very common usage of an HTML tag and attribute is while creating a link in a web document. Example: Hammock Web home page

In this example tag stands for anchor and href is an attribute which stands for hypertext reference. The value of href attribute is =”http://hammockweb.com/”, which is the home page of HammockWeb. The tag indicates the end of anchor tag. There are many attributes in HTML. Here is a description of some of the main attributes:

  1. id attribute is used to name any object which is referred by HTML tags. This name can then be accessed using Cascading Style Sheets (CSS) or JavaScript. Example:

    in which p is the HTML tag and paragraph1 is the name of this paragraph. This attribute doesn’t have any direct impact but is used by other languages to refer to this particular object or element. When combined with other languages it provides a powerful method to control this specific element.

  2. class attribute specifies one or more class names for an element. It is mostly used to point classes in a style sheet, but are also used by JavaScript to make changes to HTML elements belonging to a specific class. Example:

    applies the class name indent to the

    tag, which can then be used by a style sheet to indent this specific element.

  3. style attribute allows to apply inline CSS styling to an object or element. Example:

    can be used to apply Arial font to a specific paragraph.

  4. title attribute is used to give a title to any element, which most browsers will use to display as a tooltip when the mouse passes over it. Example: .

 

Layout of an HTML Document

Declaration

A proper HTML document begins with a line that informs the browser about the type of content it should expect. Older versions of HTML required a very long HTML declaration. For example declaring an HTML 4.01 Transitional document required the DOCTYPE declaration :

 

However with HTML5 this lengthy declaration has been simplified. Furthermore all latest versions of major browsers supporting HTML5 will automatically render the page in HTML5, even without the DOCTYPE declaration.

 

Other HTML tags

 

tag

notifies the browser that a section of HTML is getting started. The end tag indicated the end of section.

 

tag

indicates that the HTML within it and its closing tag contains further information about the document such as its title, metadata, style sheets and JavaScript.

Using the

tag

, a title will appear at the top of the browser in the title bar and will be used by search engines such as Google for indexing your website.

The contents of an HTML document which are displayed by the browser are placed inside a pair of

tags.

 

Including Style Sheets

There are different ways of incorporating CSS in an HTML document. You can either embed them within the text using inline style attribute as explained  above, or as a set of rules within the

section of an HTML document using tags. Alltop web designing companies follow a much preferred way, which is by saving all the CSS rules in a separate document, and simply including the tag in theof a document to include all the CSS rules from an external style sheet. Example:

 

Incorporating JavaScript

JavaScript can be included within a web page by either including a section within tags, or by adding an src attribute to the


 Comments

No Comment Found

Your name field required
Comments field required
Captch code field required

Blog Category

You may also like...

Web Design That Generates Leads

Unless they’re coming in from one of your amazing blog posts (you do have a blog, right?), your home page will be the first impression your future client or customer gets of you. It may be the only time they ever look at your business. You don’t want them to run screaming off into the distance. You want them to, you know, stick around and eventually maybe even buy your stuff or hire you. Here are some tips from a leading web design agency in Los Angeles, for designing a home page that generates leads. 

Make It Professional

The first step to designing a home page that generates leads is to make sure it looks professional. I’m sure you already know that you don’t want a website that looks like it’s designed by a kindergartener (although these days…)

This isn’t the 90s. Slapping fifty different colors down on a black background with three JavaScript popups is a thing of the past. But you also can’t just stick your text into the basic WordPress theme and call it a day.

You want a site that looks reputable. And that might cost some money. You should at least spend a bit for the pro version of a theme.

Before you spend some bucks, though, do some research. Who are your competitors? Better yet, which of your competitors seem to be doing good business. What does their website look like? What do other professional sites in your field look like?

Take some notes. Make some sketches. Yes, I know. It’s like school, but it’ll pay off in the end. You don’t want other people getting your business, just because your website looks sketchy.

Now look at your notes. Can you make your website with a WordPress theme? Great! Go ahead!

Need a fancier website. Find WordPress intimidating? Hire a web development firm. You’ll thank yourself later.

If you’re making the web page yourself, here are a few tips.

•        Leave some white space

•        Keep clutter down

•        Use one or two compelling images that represent what your company does

•        Don’t do almost anything that looks like it walked out of the 90s

Tell Them What You Do and How It’ll Help Them

This may seem like a no-brainer, but when you're designing a home page, you should definitely make sure your potential customers or clients know what you do or what you sell. I don’t just mean something vague like “web designer.” Be specific, because your future customers are looking for specifics. Let them know you’re a web designer specializing in e-commerce sites or a ranch that sells, specifically, organic free-range dinosaurs.

Once they know what you do, make sure your visitors know how what you do will benefit them. Your e-commerce site designs may increase their sales or their productivity. Your free-range dinosaur meat may give them vitamins lost since the dawn of time.

Don’t forget to provide examples. If you do project work, such as designing web pages or editing books, link to a portfolio. That way customers can get an idea of what you do and how you do it.

Give a Clear, Immediate Call-to-Action

In order to design a home page that generates leads, you have to actually prompt people to do something that will add them to your list potential clients. Now, it may take a bit to reel in a new client. Or they may be ready to work with you right this moment. Either way, your home page should direct the visitor to do, well, something. And, for the eager visitor, it should do it before that visitor ever scrolls down. This should be your primary call-to-action, which means it should be something like “Get a Free Quote” or “Buy This Thing and Save 20%” or “Fill Out This Form and Get This Free Thing.”

Personalize Your CTAs

This will get a bit more complicated, but if you can you should personalize your CTAs. Hubspot says that personalized CTAs work 42% better than just plain old unpersonalized CTAs.

What’s a personalized CTA? A personalized CTA adapts to your visitor. For instance, if your visitor has already filled out your newsletter form, you don’t want your CTA to prompt them to fill out the same form again. Instead, you might want offer them a free quote instead.

Provide Social Proof

You know what the best advertisement is? Word of mouth. Word of mouth, however, is a bit hard to set off just whenever you want.

You know what’s almost the same as word of mouth? Testimonials and big name clients. Put a few on your front page to prove you’ve actually done something that someone likes.

This is called social proof. Dr. Robert Cialdini did a study (see a write-up of it) where he encouraged people to reuse towels in a hotel. Cialdini found that more people reused towels if told that other people also reused towels than reused towels if told that reusing towels would mean the hotel would donate money to help the environment. In other words, social proof was an even more powerful motivator than altruism.

Where do you get testimonials? Well, from your clients and customers. It’s not rude to ask. If people like your work, I’ve found they’ll be eager to give you a bit of help.

Put Your Address and Telephone Number

If you have a physical address, put it on your home page. If you have a telephone number, put it on your home page. They’ll make you look like you’re a real person. (You are a real person, right?)

Keep Your Home Page Your Home Page

One-page home pages are popular right now, but if you can’t keep your website sleek enough to fit one page, I’d suggesting putting some stuff a bit deeper. Put an example post or two on your front page, but give the rest of your blog its own space. Same with your portfolio. Basically, just don’t make your visitors scroll on for all eternity.

Make Sure Your Website is Responsive

Your whole website should be responsive, but pay special attention to how your home page design looks on mobile phones. Is the call-to-action still one of the first things your visitor sees. Is it still obvious what you do? Is the text large and readable? Can a visitor still fill out any forms, even if they’re on a phone?

Basically, if you give your business card to someone and then they look up your website on their smartphone, will they be impressed or confused?

Your home page is important. It's not just something you throw up because you're supposed to have a main page! It's not just a welcome mat. It is, in a way, your front window into the world. And, with a little thought, a home page can be designed so that it generates leads and brings you more business

6 Things you need to Know to Design a Great Website User Experience

A website that makes a visitor feel like it was designed just for them, does wonders in retaining those users and making them come back for more. Navigation, text, media and graphics are the primary factors which should be kept in mind while designing a website.

Understanding how visitors browse through sites is important to determine the dos and don’ts of web development. Here, we are listing some tips that will improve your website’s user experience and navigation.

Information is Important

Imagine this: You visit a website which is attractive in design, but it doesn’t give you the information you need, or is overshadowed by the visuals. Will you stay on the website?

Although design is a great factor in attracting visitors, it is not usually the design a user is looking for. A website that focuses on the design more than the information tends to be overwhelming to the visitor, leading to the user abandoning the webpage and searching for another source.

A web development company should bear in mind to keep the design simple and uncluttered. Integrate designs and images in your website which will help the user easily determine what the site is about and where to look for certain information. If the design hinders the user in acquiring information, get rid of it and replace it with a design that aids the user in finding out what they want in a hassle-free manner.

Be Responsive

The saying “content is like water” is the basis of responsive web designs. Designing a website that is responsive means that content can be viewed easily in all devices—laptops, mobiles, tablets, you name it. Getting a responsive design for your website ensures that your visitors are not annoyed if they have to constantly zoom in to read the content while using a smartphone.

Since 80% of internet users utilize mobile devices, it is important for a website designing company to understand that websites should accommodate mobile and smartphone users or be left behind in the competitive race of web development.

Furthermore, Google has changed its algorithm and now ranks your website on the basis of how mobile-friendly it is. So if businesses want to improve the ranking of their websites, going mobile is a great option.

Cut Down on the Page Load Time

Whether you are standing in a queue, or hanging around for the lunch you ordered to arrive, waiting is frustrating. Waiting for a webpage to load is a similar experience and since, in this case, a user has the choice to leave the page entirely, this is commonly the option people opt for when a page takes too long to load. According to Radware, a two second delay in website’s loading time resulted in abandonment rates as high as 87%.

Moreover, with a high page load time, businesses suffer more today than they did a few years back. In 2010, if a page took six seconds to load, it suffered a conversion hit of -40%. Today, the same time will take a hit of -50%. Users expect a sleek and friendly webpage where they don’t have to wait too long and it is up to the web development company to provide them that.

You can use GT Metrix, Website Grader, and Google’s PageSpeed Insights to analyze your site’s speed and make fixes wherever required. Enabling browser caching and compression and optimizing images will minimize your page load time to a great extent.

Be Visually Responsible

Images are a great way to tell a story without words. Successful websites make the use of images on their home pages to tell the visitor what the business is about and what the visitor will get out of it. Too much of a good thing, however, is dangerous.

As we’ve mentioned above, images hog a lot of bandwidth, which results in a high page load time for a website. To counter that, images should be scaled down or compressed so that bandwidth remains free and visitors to your website can enjoy a great website-user experience.

Another thing to keep in mind, while designing a website, is that images should not be stock photos. Instead, use images of your own. Remember, the purpose of a website is to brand your image, and it won’t be possible if you are not using images of your own company/products.

The Navigation Bar is Your Friend

So, now that you have a responsive website with a simple, elegant design and have taken measures to reduce the page load time, you have ensured that a user will visit your website without hassle. The next step is to plan to make the visitor stay on your site, and here’s where the navigation bar comes into play.

Navigation bar is a guide to your website, and if the guide is not helpful, the visitor will not be engaged and will promptly leave. According to a research by Forrester, if the first visit to a website is negative, 40% of the visitors will not return.

When you are hiring a website development company to design a corporate website, discuss your content with them and the design for the navigation bar. Design director Daniel Alves comments that the navigation bar is “the most important design element on a website.”

In order to create an interactive navigation bar, keep the design simple and easy-to-read. Since people read in a left-to-right pattern, it is advised to keep your products and services on the left of the bar and the “actions” on the right.

Sharing is Caring

Social sharing is the new boom. Integration of social media sharing buttons gives you the opportunity to make your visitors your advertisers. The more the people share your web pages on social networks, the more your exposure is increased. So embrace the practice of social media sharing and watch as the traffic on your website multiplies!

 

Bottom line: Keep the user’s perspective in mind. If there is anything that annoys you while browsing sites, chances are that they will annoy other users, too, so it is best to employ those methods which help the user find exactly what they are looking for on your site without getting lost or overwhelmed by your website navigation. A user-friendly website will entice new visitors and turn them into regulars.