Friday, September 24, 2010

HTML doctype

HTML doctype

The <!DOCTYPE ...> declaration (technically it's not a "tag") should be the very first thing in your document. A DOCTYPE is required to validate the document.

The version of HTML against which the document is validated is based on the DOCTYPE.

Different version doctype is shown below.

This is the <!DOCTYPE ...> declaration

For HTML version 3.2:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

For HTML version 4.0: we have three standard doctypes.
The documents that strictly confirm and that aren’t frameset documents use this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd”>

For a not quite so strict conformance use this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">

For documents which are frameset documents use this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"http://www.w3.org/TR/REC-html40/frameset.dtd">

HTML Bold

The HTML bold tag is used for specifying bold text

<html>
<head>
<title>Cooltuts.com</title>
</head>
<body>

Hello Friends <b>I am bold</b> Welcome

</body>
</html>

Few attributes you can use in this bold tag

Title: some browser displays this text when the user keeps his cursor on this text example as shown below.

<html>
<head>
<title>Cooltuts.com</title>
</head>
<body>

Hello Friends <b title="bold text">I am bold</b> Welcome

</body>
</html>

Like title you can use

class, dir, id, lang, style, onclick, ondbclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup.

Thursday, September 23, 2010

HTML Title

Title is very important to every web page, by reading title user should know what content can expect in that page/screen. As of me the title is supposed to describe the whole page in a few words.

<html>
<head>
<title>Cooltuts.com</title>
</head>
</html>

As you see above example title tag <title> comes in between head tag <head>. This title content appears on your web browser tab or browser title bar – at the very top of the window.

Mainly search engines like Bing, Google takes title as main content and show according to the title. So, your title should contain everything means main keywords. Especially if someone likes your web page and he puts your page to favorites or bookmarks then this title will appear.

Try to search something in Bing/Google then you will see title appears as our link to a particular site.

Monday, September 20, 2010

HTML Randome topics

  1. How to get HTML link or anchor tag without underline

How to get HTML link or anchor tag without underline

by Emmaneale Mendu, Web Developer
Basic anchor or link code looks like this
<a href="http://www.cooltuts.com/">Visit Cooltuts.com</a>

On Web browser this looks like
Visit Cooltuts.com

Let’s work with style property to remove the Underline to the link; basically if the text is underlined then by default user thinks it’s a link. But in some cases the requirement will be without underline.
We use “text-decoration” to overcome this issue. This is a style property we do have none|inherit|combination of ‘underline’,’overline’,’line-through’ and ‘blink’

Properties

style="text-decoration:none" (remove complete decoration like underline)
style="text-decoration:underline"
style="text-decoration:overline"
style="text-decoration:line-through"
style="text-decoration:blink" (wont work in IE but works in Mozila)

If you are using style="text-decoration:none"

<a href="http://www.cooltuts.com/" style="text-decoration:none">Visit Cooltuts.com</a>

Output looks like
Visit Cooltuts.com

Sunday, August 22, 2010

Elements and Attributes

<element_name attribute_name="attribute_value">
                Element Content
</element_name>

1) Elements(aka tags): specify the type of content - how the content will be used in a XML document. XHTML defines its own set of valid element_names (e.g. head, body, h1).

2) Attributes: give special properties to each element. Again, XHTML defines its own set of valid attribute_names (e.g. class, style, id).

Friday, August 6, 2010

HTML Introduction

Welcome to HTML Basics. This Site leads you through the basics of Hyper Text Markup Language.

To begin using HTML, you will need to have a few things. Here is the big list of items you need to have to get started.

1. You will need to have a computer that is running. Most likely you have this already, since you are reading this page.
2. You will need a text editor of your choice. If you have windows, Notepad will do the trick. If you have a Mac, you can use BBE dit. To find Notepad/BBE dit on your computer.

          In Windows 3.x, find the program group named "Accessories" and double click to open it.

3. You will need a web browser of your choice. If you possibly can, use the latest version of Netscape Navigator or Microsoft Internet Explorer.
4. You will need a place to save your work. You can use your hard drive, a floppy disk, or your web server. You don't have to work online, you can write the html and use your web browser offline on your own computer. We will get to that shortly, in the next tutorial.

Okay, once you have the above materials, you can begin creating your own web pages with HTML. Let's move on to the next tutorial, Using the Materials.