Skip to main content

CSS Syntax

CSS Syntax

Introduction to CSS

CSS refers to the cascading sheet styles which is a new way to design web pages.It comes to great significance because of its portability.Those who are known to programming know that we can include or import files to our program.Using CSS we can import or link other cascading styles int our webpage without retyping the code.Its really useful when you design big webpages of thousands of lines of code.Before we learn all the properties of CSS we first must know its syntax.

CSS syntax

CSS is a styling way which means that is should start and end with some specific tag which would tell the browser that "hey!This part is for styling and don't display it".That specific tag is..

<style> :- start of style code
</style> :-end of style code

CSS syntax consists of 2 elements;- 1.CSS selector
                                                          2. Block of code

CSS selector is a tag which determines which element of the webpage is to be designed.
Block of cde determines which properties is to be applied to that element of webpage.

We'll study all properties one by one:-

Lets explore the block of code first:-
Block of code starts with the curly bracket { and ends with the curly bracket }
Inside the brackets, There are pairs of properties and their values.

Here is an short example:-

CSS code

<style>
#my_test{
font-size:30px ;
text-decoration:underline ;
border:1px solid ;}
<style>

HTML Code

<div id="my_test">Here you'll see this paragraph different from the others displayed above.</div>

Comments

Popular posts from this blog

Image Search Engine Using Python

Images provide a lot more information than audio or text. Image processing is the prime field of research for robotics as well as search engines. In this article we will explore the concept of finding similarity between digital images using python. Then we will use our program to find top 10 search results inside a dataset of images for a given picture. It won't be as good as google's search engine because of the technique we will be using to find similarity between images. But what we are going to make will be pretty cool. So lets start. Setting up the Environment Our Algorithm How the code looks Lets build the GUI Additional Techniques Setting up the Environment The code we are going to write requires a few tools which we need to install first. I will try to be as precise as i can and if you get stuck into installing some tool then you can drop a comment below and i will help you sort out the problem. So here are the tools and the steps to install

Understanding Python Decorators

If you have ever wondered what those @something mean above a python function or method then you are going to have your answers now. This @something line of code is actually called a decorator. I have red from various articles about them but some of them were not able to clarify the concept of a decorator and what we can achieve with them. So in this post we'll learn a lot about python decorators. Here is a list of topics we'll be covering. What is python decorator Understanding the concept Multiple decorators on same function class method decorator Where can we use decorators What is python decorator A python decorator is nothing but a function which accepts your given function as a parameter and returns a replacement function. So its like something this def decorator(your_func): def replacement(your_func_args): #do some other work return replacement @decorator your_func(your_func_args): #your_func code Now when your_func gets called then

Cordova viewport problem solved

Include the viewport settings in Cordova If you are facing the auto zooming problem of cordova then go read on the full article. Cordova actually ignores the viewport meta tag which causes the pixel density problem. So we need to tell cordova that viewport tag is equally important as other tags. To do this, we need to add some code to a file which is specify in the article. Corodva messes with pixels If you are using the latest cordova version or creating the cordova app for latest android versions then you may have faced the zoom malfunctioning.I also faced it when creating an app. Many of you may have already searched the web and found the answer of changing the meta tag attributes to get it working. But adding target-densitydpi=medium-dpi does not solve the problem for latest android versions. It may work for gingerbread but not for kitkat and others. So the final solution which i found was one of the stackexchange answer but rarely found. So i am gonna two things here, i