Wednesday, 21 May 2014

RESOLVING CSS CONFLICTS

here is the title image
Hi friends!
Welcome back. Today I came with new topic which really help you a lot which about the css conflict. When you add style to the element but it does not apply on it why. You check it many times for bug but there is no bug in your code. There is concept of css which is conflict many people do not about these basic concepts. Today we talk about them and discuss how to use them.

CSS CONFLICTING;

Two are more styles are applied to the same element.
For example;

P{
Font-size:2em;
Color:red;
}
 P{
Font-size:1.8em;
Color:blue;
}

Now question is that which style applied to the element the answer is simple last one will win. The css contain of three basic concepts such as specificity, inheritance and cascade.

CASCADE;

The cascade rules depend upon the order of your css. The last property applied to the element.
For example;

Body{
Font-family:Helvetica;
 }
 P{
Font-family:Georgia;
}
In the above case all the paragraph change with Georgia font and the Helvetica don’t work on the paragraph because the order of css.

SPECIFICITY;

Specificity defines the rules applied to the element.
If the style does not apply to the element the reason is specificity.
If two selectors are applied to the same element the selector with high specificity wins.
If two selectors have equal specificity the last one wins.
For increasing specifity you can use id selector but the inline style has more specificity than the id selector but for the reason we prefer to the id selector for more specificity.

How to count specificity?
The counting specificity is very easy. The each id is equal to the 100,  the each attribute, class and pseudo-class is equal to the 10 and the each element is equal to the one  .

For example;
 P{
Font-size:1.5em;
Color:red;
}
.main p{
Font-size:2em;
Color:yellow;
}
In the above the example the paragraph with class will win because it has more specificity than the paragraph.

INHERITANCE;

For instance you add the properties to the body it inherited to all other properties which are present in the body such as heading tags, paragraph and other tags present in the body tag.
For example;
Body{
Font-family:Helvetica;
Font-size:1.5em;
}
The above properties applied to the all elements which are present in the body tag.

CONCLUSION;
Now you have understanding of the css conflict and how to use them and take fullest advantage of them. Remember in your prayers and don’t forget to share our post with your friends. THANKS



Read More...

Wednesday, 14 May 2014

STYLING CSS LINK AND CSS LIST

As we discussed before in html tutorial that the links are the soul of the webpage.

WebPages are containing of links without links webpage is nothing. Links allow us to jump from one page to another page or on same page. Some times we create very large document in order to help the visitor we make links on the same page. Today our topic styling links in css.

What is the links?
Links are the way by which you can jump from one page to another page.

STYLING LINKS

Link should be change by its surrounding such its background-color, color should be change from surrounding text.
There are four types of links property given below;

a:link unvisited link.
a:visited visited link
a:hover mouse over a link.
a:active user has clicked link.

Note
The sequence is important you have to write first link then visited then hover and finally active. You can add the text decoration, background color, text size, font style, font weight etc to the links.

a:link
this is unvisited link

a:link{
color:red;
}

link styling


a:visited
this is the visited link

a:visited{
color:green;
}
color green

a:hover
when users take mouse over link.

a:hover{
color:blue;
}

color blue



a:active
when users clicked the link.

a:active{
color:yellow;
}
yellow color

CSS STYLING LISTS.

Many times we need lists . in html we make lists in css we design them you can add numbering, dot, circle and also you can add images to the lists lets discusse about the styling lists. There are two types of lists in html unordered list or ordered lists.

UNORDERED LISTS;
Unordered lists contain of bullets.
ADDING CIRCLE;
ul {list-style-type:circle;}


bullet style

ADDING SQUARE;
ul {list-style-type:square.}

How to add the image as list item marker?
Yes you can add the image to the list item marker.

ul{
list-style-type:url(bullet.png)
}

adding image

FINAL WORDS;
Friend now you can edit the list item according to your wish. Keep working and remember in your prayers and don’t forget to share our post with your friend.THANKS


Read More...

Sunday, 11 May 2014

CSS TEXT FORMATTING

Hi friends Assalam-o-alaikum
Friends today we are going to discuss text formatting in css. How to make the text more readable, beautiful and attractive. For this you have to learn css selector before. In this tutorial we will discuss all the properties about text formatting such as font-family, font color, line-height, and many others. Let’s come to the topic.
 Also visit the css selectors  and text formatting in html.

Text formatting


With css we design the text beautifully. The different property we use to design the text such as text-decoration, font-family, color, text-align, font-size, font-weight, text-transformation, text-indention and many others. Which we discus below.

COLOR PROPERTY

Some times is important to add color to the text. You can write the value of color in hex, rgb and also red. we can add color to text like this,

p{color:red;}
h1 {color: green;}
 
color property

TEXT-ALIGN

This property is used to define the position of text. As you want to add the text left, right or to the centre for this you can use this property.
FOR EXAMPLE
p{
text-align:right;}
h1 {
text-align:center;}
h2{
text-align: left;
}

 
alignment property
TEXT-DECORATION

It is the property which is used to define the decoration of text or for removing the decoration.

FOR EXAMPLE;
For removing text decoration,
 { text-decoration:none;}

Adding decoration to text,
It has three more values overline, line-through, and underline;
    p{
text-decoration:overline;
 }
p{
text-decoration: line-through;
}
p{
text-decoration:underline;
 }
decoration property

Text-Transformation

This property use to change the text in lowercase, uppercase and capitalize the first letter of each word.
EXAMPLE;           
p{
text-transform:uppercase;}
p{
text-transform:lowercase;}
p{
text-transform:capitalize;}

transformation

FONT-FAMILY

To define the font family means that you want to use different types of font. You use the property of font-family (Helvetica, Georgia, Verdana etc).
FOR EXAMPLE
p{
font-family: Helvetica;
 }

font-family

TEXT-SIZE

Yes you can also set the size of text which you want. Size of text define in different units such as em, px , percentage, centimenter, millimeter and points. I prefer you to use the em unit because it change the size of text according to the device.

p{
Text-size:2.5em;
 }

font-size

FONT-STYLE

This property is used to make text oblique, italic and also you can set normal the font.
FOR EXAMPLE;
p{
font-style:italic;
font style

FONT WEIGHT;

It is the property which is used to make text bold or lighter and also set to the normal value to the font.
FOR EXAMPLE;
p{
font-weight:bold;
}
 
font-weight

LINE-HEIGHT

To add the height between to lines we use the line-height property.
FOR EXAMPLE;
p{
line-height:200;
 }
 
property of line

LETTER-SPACING

To add the spaces between the letters we use this property. To separate letters.
FOR EXAMPLE
p{
letter-spacing:5px;
 }
 
property of spacing letter

WORD SPACING

To make the space between the words we use this property.
FOR EXAMPLE
p
{
word-spacing:3px;
}
property to text

 

FINAL WORDS

Now friends you can easily format the text beautiful make you design more efficient please remember in your prayers don’t forget to share our post with your friends keep visiting. THANKS!
Read More...

Friday, 9 May 2014

HTML FORMS WITH DETAIL

Html forms are used for website interaction. In this way the visitors can communicate with you. The html forms contain different elements such as first name, last name, password, confirm password, favorite lists, gender etc .html form start with <form> and end with </form>.

<input> this tag contain different attributes such as name, size, maxlength and type. It is used to make input field between form tags.
          Type=  It tells the browser that it is text field, password, submit field.
          Name= Defines the name of field.
          Size=  This attribute used to define the size of input box.

        Maxlength= This is used for maximum character in the input box.

FIRST NAME;

In text type you can add any which in text such as first name, last name etc.
FOR EXAMPLE
First name :< input type=”text” size=”15” maxlength=”30” name=”first name”>
        
Html forms

Password;

In this type you can add the password field in your form which means if you type any thing in the password it appears in the shape of black dots.
FOR EXAMPLE;
First name :< input type=”password” size=”15” maxlength=”30” name=”first name”>
pasword field

 SUBMITTING DATA.
Now little bit your farm is complete but problem is that how we send data and where and adding submitting button.
 There are two type of method of sending data.

  get it sends the data showing its as url. This is easy to hack for hackers.
 Post it send the data without showing its as url.

NOTE
get is on the default if you don’t tell the browser it automatically use get method.

How to define the method of post in form?
You can define with attribute of method just like that <form method=’post’>

Where to send data?
The two type of sending data one is you can send to the email system and this is very easy method. Second is the scripting you can use the script of php, perl, javascript etc.
You use action attribute in form tag.just like that.
EXAMPLE;
<form mehod=’post’ action=’mailto:mohammadwaqar401@gmail.com’>
SUBMIT BUTTON;
Adding submit button again we use input tag between form tags.
EXAMPLE;
<input type=’submit’ value=’submit’>
screenshot

RADIO BUTTON

In the radio button you have only on choice. You give the two option choose your gender one option is male and other is female. If you click on the male it marked and when you click on female it marked the female but unmarked the male.
Forexample

Gender  <input type='radio' name='gender' value='Male'>Male
                       <input type='radio' name='gender' value='Female'>Female
Male or female

CHECK BOX;

In the check you have multiple choice. Just like that tick  your favorites cities.
If there is newyork, London, sydny you can select all of these.

For example;

<input type='checkbox' name='cities' value='Newyorl'>New york <br />
                <input type='checkbox' name='cities' value='Sydny'>Sydny <br />
                <input type='checkbox' name='cities' value='London'>London <br />

html forms

DROPDOWN LISTS;

In this you can add list and you can select one item from the list. Drop down list contain two tags one is select and second is option. Option tag placed between select tag.
For example
  <select name='birthyear'>
<option> 2001</option>
<option> 2002</option>
<option> 2003</option>
<option> 2004</option>
<option> 2005</option>
<option> 2006</option>
<option> 2007</option>
<option> 2008</option>
<option> 2009</option>
<option> 2010</option>
<option> 2011</option>
<option> 2012</option>
<option> 2013</option>
<option> 2014</option>
</select>
dropdown

FINAL WORDS;
Now you know how to make form in html. It is very easy but it need some practice. Keep practicing remember in your prayer and don’t forget to share our post with your friend. Keep Visiting!
Read More...

Tuesday, 6 May 2014

HTML TABLES


Hi friends Assalam-o-alaikum

Friends as you know that in the previous we discussed about css selectors and how to use them and few of their types. Today I come with new topic which is all about the html table some people think that the html table. Believe on me it is not difficult as you think. It is very easy it needs only your concentration. Table is essential to learn it help in submitting your data in table and also helps in making layout. Yes you can design layout with it.

BASIC TABLE

The basic structure of table consists of some basic table tags. Table contain of rows and columns. The html table consists of some basic tag which is given below,

<table></table> this tag defines the table in webpage.
<tr></tr> the tr tag defines the table row in table.
<th></th> the th tag defines the heading in table.
<td></td>this tag defines the data in the table.

For example

<table>
<tr>
<td>name</td>
<td>category</td>
<td>price</td>
<tr>
<td>physics</td>
<td>science</td>
<td>200</td>
</tr>
</table>

ADDING TITLE HEADING AND BORDER.

As you need title and heading for your page as like you need title and heading and also border for html tables?
BORDER; you can syle tables with css and also with the the attributes.

For example:

<table border="5"  >
<tr>
    <th colspan="3">BOOK STORE</th>
</tr>
<tr>
 <td>name</td>
<td>category</td>
<td>price</td>
</tr>
<tr>
<td>physics</td>
<td>science</td>
<td>200</td>
</tr>
</table> 
SCREENSHOT 
html table

HEIGHT, BORDER COLOR, WIDTH.


We can set the height of table and width of the border and also add the color to make it beautiful.

FOR EXAMPLE
<table border="4" bordercolor="red" width="50%" height="40%">
<tr>
    <th colspan="3">BOOK STORE</th>
</tr>
<tr>
 <td>name</td>
<td>category</td>
<td>price</td>
</tr>
<tr>
<td>physics</td>
<td>science</td>
<td>200</td>
</tr>
<tr>
<th colspan="3">www.worldoftuorials9.blogspot.com</th>
</tr>
</table>
SCREEN SHOT 
html table 2

CELL SPACING AND CELLPADDING.

To add the padding and spacing between the tables we use these attributes cellpadding and cellspacing. Cell padding defines the padding between the cell and cellspacing defines space between the cells.
FOR EXAMPLE;
<table border="4" bordercolor="red" width="50%" height="40%" cellspacing="8" CELLPADDING="7">
<tr>
    <th colspan="3">BOOK STORE</th>
</tr>
<tr>
 <td>name</td>
<td>category</td>
<td>price</td>
</tr>
<tr>
<td>physics</td>
<td>science</td>
<td>200</td>
</tr>
<tr>
<th colspan="3">www.worldoftuorials9.blogspot.com</th>
</tr>
</table>
SCREEN SHOT 
html table

ADDING CSS TO TABLES

We can use css to add styling to the tables it makes it more beautiful and better looking. We are only describing it little bit.
FOR EXAMPLE
<table border="5" style="background-color:#F62817;border:1px dotted black;width:80%;border-collapse:collapse;">>
<tr>
    <th colspan="3" style="background-color:#C11B17">BOOK STORE</th>
</tr>
<tr>

<td>name</td>
<td>category</td>
<td>price</td>
</tr>
<tr>
<td>physics</td>
<td>science</td>
<td>200</td>
</tr>
<tr>
<th colspan="3">www.worldoftuorials9.blogspot.com</th>
</tr>
</table>

html tables

FINAL WORLD


Friend now you can make the table easily first keeps practicing. Remember us in your prayer and share our post with your friends. Keep visiting.


Read More...

Sunday, 4 May 2014

CSS SELECTORS

Hi friend, Assalam-o-alaikum.

As you know from few days we learn the html such as htmlbasic tags, html meta tags, text formatting in html. Today I am going to present tutorial on css selector. I don’t take your time much. lets start.

What is css selector?

Css selector contain of id and class with class and id you can specify any element on the page which you want to style.
Css selector is used to identify or find the html elements which are based on their id, attribute etc.

THE ELEMENT SELECTOR.

The element selector is the base on element name.
If you want to style paragraph use p tag identify the selector
For example you want to select the paragraph and want to change its background or font. What you will do? Here is how we can do this is very easy

P{
Background-color:violet red;
font-family:Verdana;
}

In the above the case it design the all paragraph on the page and also their font but you want to design particular paragraph on the how we will do this? This is easy we can do this with css selector id and class. You add class or id tag. Like this.

Html
<p id=”important”>this is the important paragraph on the page we want design different from other</p>
This is how we add id in html now we can indicate this paragraph particularly.
Css
#important{
Background-color:violet red;
font-family:Verdana;
}                                                                     

 What is id?

For id selector we use id attribute with in the html tag.
Id tag must be unique. It should be not repeated again and again
The id is unique and it is use only one time in the whole page.
The id can be identifying with the hash (#) character.
                                                                                                
FOR Example
#paragraph1 {
Background-color:blue;
}

What is class?

For class selector we use class attribute with in the html tag.
The class can be used multiple times on the page. It can be repeated again and again.
The class is not unique it can be use many times on the same page.
The class selector can be identifying with the period (full stop).

NOTE
The same class can be use on multiple elements.
The multiple classes can be use on same elements.

For example.
.paragraph2{
background-color:green;
}

GROUPING SELECTOR.

The grouping selector is use when you want to apply same style to different elements. For this you can use group selector.
It reduces your effort to write same code again and again.
For example: if you want to change the font family of all headings.

h1,h2,h3,h4,h5,h6{
font-family:Gorgia;
 }
                                                 

FINAL WORDS.
In the above we mentioned the basic selector which commonly used by every one Inshallah in few days we will discuss on the advanced css selector but it is important that you have basic understanding of selector. Please keep visiting and share our post with your friends. Thanks!
Read More...

Saturday, 3 May 2014

TEXT FORMATTING IN HTML

Hi friends, Assalam-o-alaikum as we learnt earlier the link tag and image tag now come to the text formatting in html. It is necessary to know because text formatting is main part without you can not manage your contact. Today I am going explain how make text italic bold underlined different forms of tag. These tag make your content readable and beautiful you can make it more beautiful to add css to webpage. This will be discussed in future how to make page more beautiful with css. Let’s come to the topic.

TEXT FORMATING.

HEADING.

As you know in every page first and important tag is heading tag. You can use various sizes of heading tag. Heading tag has six levels h1 to h6. The biggest heading h1 and smallest is h6.

For example

<h1>heading one</h1>
<h2>heading two</h2>
<h3>heading three</h3>
<h4>heading 4</h4>
<h5>heading five</h5>
<h6>heading six</h6>

 PARAGRAPH.

The second most tag in the page is paragraph with this tag you show different paragraph. It leaves the blank line before and after the paragraph.
 <p>this is paragraph tag<p>

Line break.


The <br /> tag we used to break line this is the example of an empty tag. This tag use to break line not to separate paragraph.

<hr>

<hr >tag used to separate the content in html page. It has no end tag in html but in xhtml its closing tag look like this <hr />.it is also an example of empty tag.

BOLD TEXT.

The text between the <b></b> the text displayed as bold.

For example;

<p>this the <b>bold</b> tag in paragraph</p>

ITALIC TEXT.       

The text between the <i>italic</i> the text displayed as italic.

For example;


<p> this is the</i> italic</i> tag in paragraph</p>

UNDERLINED TEXT.

The text between the in tags<u>underlined</u>this text will displayed as underlined.

<p>this is the paragraph tag with explanation of <u>underlined</u> tag.

 STRIKE-OUT

It puts the line through the text.

For example

<strike>This tag is strike</strike>

PERFORMATTED TEXT

The text between the tag it will be display as you write it in the text editor. You can add multiple spaces which browser neglect.

For example

<pre>this is the preformatted text</pre> 

 SUPERSCRIPT TEXT.

The <sup> tag defines the superscript text. The text appears half character above the baseline.
 <p> this is the paragraph contains on <sup>script text</sup></p>

SUBSCRIPT TEXT.

The <sub> tag defines the subscript text. The text appears half character below the baseline.
 <p>this is the paragraph contain on <sub> subscript text</sub></p>

SMALL TEXT

Instead of using font size we use small text tag. This tag make small text than the normal text.
 <p>this is the paragraph tag with the <small>small tag</small><p>

LARGE TEXT.

For large text we simply use <big></big>tag.
 <p> this is the paragraph tag with <big>large text</big></p>

FINAL WORDS.

In this tutorial you have learnt about the html text formatting. Now you have concept of text formatting. Please visit us regularly and don’t forget to share our post with your friends.
Read More...