Navbar

Wednesday 26 June 2019

Way to Insert CSS With Example

Way to Insert CSS With Example


You can apply CSS over HTML Element by following ways : 
  1. Inline Styling 
  2. Internal Styling
  3. External Styling

Above mentioned ways can be implement to insert CSS over HTML Element.
So first we are going to see Inline Style means how we can use inline style and what is the syntax of Inline styling.

Different Ways to Insert CSS by Tech Talk Tricks
Different Ways to Insert CSS by Tech Talk Tricks

Inline Style:
  
    If we style out HTML content inside that particular element then it is inline style.

Example :

<p style="color:red;font-size:15px">Hello Tech Talk Tricks</p

Explanation : 

     If we want to style only particular element or HTML content then we used inline style method. As you can see the style="color:red;font-size:15px". So this the high priority styling in HTML document.

Note : If you are using inline styling then don't forget to use Style  Attribute before assign it properties and value.

Internal Style:

    Internal Style are basically used when we want to append our style on only specific web-page. As you saw, that if we want to style only particular element of web-page the we used Inline Style.So if we want to use style for specific web-page then we can use Internal style.

For Internal style, we'll place our css code between <head>...</head> tag surrounded by <style>...</style>  tag.

Example : 

<html>
     <head>
        <style>
             p{color:red;font-size:15px;}
        </style>
     </head>
     <body>
         <p>Hello Tech Talk Tricks</p>
     </body>
</html>

Explanation : 

  As above example, you can use internal styling in head tag surrounded by style tag.

External Style:

If you want to manage all styling of your complete website the  you can use external styling method. For external style we will create a CSS file and then link that created CSS file to our each web-page of website.So if we change any style from CSS file then it will be affect the whole web-page means single CSS file will control all design part of your website.

Example : 

<html>
     <head>
        <link href="demo.css" rel="stylesheet" type="text/css" />
     </head>
     <body>
         <p>Hello Tech Talk Tricks</p>
     </body>
</html>

demo.css file Content 

    p{color:red;font-size:15px;}

Explanation : 

  In Above example, we create a file name as demo  and inside demo.css file we write  p{color:red;font-size:15px;} after that saved that file with .css extension.

So if you run your HTML file and if everything is correct then you will get the same output as above mentioned Inline style and Internal Style.

? What if we apply different style on same HTML element 

  There may be scenario In which we applied different CSS on same HTML element, then what will be happen and which style (Inline/Internal/External) will be apply on that element.
so understand the scenario by Example,

> First we applied Inline style on p Element :
    
   <p style="color:red;">Hello Tech Talk Tricks</p>

> Second we applied Internal style on p Element :

<html>
     <head>
        <style>
             p{green;}
        </style>
     </head>
     <body>
         <p>Hello Tech Talk Tricks</p>
     </body>
</html>

> Third we applied External style on same p Element : 

p{color:yellow;}

So we saw we applied different color for p element on different styling ways then which color it will take to display on web browser. So here is the priority list >
 Inline Style > Internal Style > External Style

If all styling ways try to style the same HTML element then it will first take Inline Style.If Inline style not found then it will go for Internal style and Internal Style also not found then it will apply the External style CSS code.


Watch videos of CSS on YouTube, Click on the below link : 
Watch Video in HINDI on YouTube Click on the below video


Sunday 23 June 2019

CSS Syntax and CSS Selector With Example

CSS Syntax and CSS Selector With Example



CSS Syntax : 

   Basically CSS rule-set consist of selector and declaration block.It means in CSS there is all about properties and value.So if you get strong knowledge of properties and their values then you can create any type of website : Static or Dynamic website.

Watch videos of CSS on YouTube, Click on the below link : 
CSS Syntax and Selector by techtalktricks
CSS Syntax and Selector
Explanation : 

Selector : Basically Selector points to the HTML element on which we want to style.

Declaration : Declaration block contain more than one block and each block is separated by semi-colon(;) symbol.

Each Declaration part contain property and their respective value in-front-of forwarded by colon (:) symbol.

CSS Declaration part always ended by semi-colon(;) and declaration blocks wrapped by curly bracket {}.

In the above example, <p> element color is red and their font-size will be 15px. 

To run the above example and show output on web browser then do the following thing: 

<!DOCTYPE html>
<html>
<head>
<style>
p{color:red; font-size:15px;}
</style>
</head>
<body>
<p>Welcome to Tech Talk Tricks</p>
<body>
</html>

Save the above marked code by any name followed by .html. Ex : demo.html

After save right click on the saved file and open with browser then you can now see the output of the above mentioned document.

CSS Selectors : 


We can use CSS Selector to find or select HTML element based on their element name,class, id, attribute or more.

The Element Selector:
  
      You can select HTML element by element name and after that you can apply CSS on it.So above example is the Element Selector based example.

The Id Selector :

      You can select HTML element by Id selector also to apply CSS on it. Whenever we want to use Id selector then provide # before Id Name.

Example : 
<!DOCTYPE html>
    <html>
<head>
<style>
#para{color:red; font-size:15px;}
</style>
</head>
<body>
<p id = "para">Welcome to Tech Talk Tricks</p>
<body>

</html>

As you can see above example red highlighted part is the Id selector use.First we need to provide the id on which we want to apply CSS, After that for apply CSS use # before Id selector name between <style></style> and provide properties and value for it.

Note : An Id cannot be start with Number.

The Class Selector : 

You can select HTML element by Class selector also to apply CSS on it.
Whenever we want to use Class selector then provide .(dot) before Class Name.

Example : 
<!DOCTYPE html>
    <html>
<head>
<style>
.para{color:red; font-size:15px;}
</style>
</head>
<body>
<p class= "para">Welcome to Tech Talk Tricks</p>
<body>
</html>


Note : A Class Name cannot be start with Number.


Watch Video on YouTube related to CSS Selector and CSS Syntax



CSS Introduction by Tech Talk Tricks

CSS Introduction by Tech Talk Tricks


CSS stands for Cascading Style Sheet. CSS describe how HTML element display on we browser.Means if You write only HTML then only content will be appear on web browser and if you use CSS with HTML then you can enhance visibility and appearance of your HTML content.


Watch videos of CSS on YouTube, Click on the below link : 

CSS saves lots of work.It can control the layout of multiple web-pages all at once.For a website you can create one single file of CSS and you can control all design part of your website.

Environment setup for use CSS with HTML : 

These are the required tool for develop any website using HTML and CSS
  1. Browser (Google Chrome, Mozilla Firefox etc..)
  2. HTML Editor (Notepad++, Visual Studio, Sublime Text etc..)
For run HTML + CSS file you need first any updated browser for display your HTML content and any text editor mentioned above for write HTML source code.
You can also use your pre-installed Notepad in your system.But Tech Talk Tricks recommend you to install Notepad++ for better. 

Install Notepad ++ by click on the below link

After download complete installation process of Notepad++ and now you are ready to use Notepad++ for your HTML + CSS Code.

Watch video related to the CSS Introduction

Saturday 22 June 2019

CSS Tutorial by TechTalkTricks

Complete CSS Tutorial from Scratch to Advance with Videos

If You want to become a independent web designer or web developer (Full Stack developer) then follow these tutorial series.In which you can read article related to the title with suitable example as well as you can watch the related topic video by navigating to the below of the every article.

Watch videos of CSS on YouTube, Click on the below link : 
               CSS Tutorial For Beginners                Advance CSS Tutorial

So get ready with TechTalkTricks and learn CSS from Scratch to Advance Level.
CSS Tutorial From Beginners to Advance by TechTalkTricks
CSS Tutorial From Beginners to Advance by TechTalkTricks