Type Selectors in CSS

varma
Updated on 30-Jan-2020 07:24:30

1K+ Views

A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.With the type selector, set for HTML tags like h1, h2, h3, p, etc:h2 {    color: #FF0000; }Set for p:p {    color: #800000; }

What is a Selector and How It Is Used in CSS

Lakshmi Srinivas
Updated on 30-Jan-2020 07:23:49

546 Views

A selector is an HTML tag at which a style is applied. This could be any tag like or etc.The following figure describes what a Selector is:Let us see an example of Type Selector, to set color:h1 {    color: #36CFFF; }

Base Overloading Methods in Python

Mohd Mohtashim
Updated on 30-Jan-2020 07:22:55

466 Views

Following table lists some generic functionality that you can override in your own classes −Sr.No.Method, Description & Sample Call1__init__ ( self [,args...] )Constructor (with any optional arguments)Sample Call : obj = className(args)2__del__( self )Destructor, deletes an objectSample Call : del obj3__repr__( self )Evaluable string representationSample Call : repr(obj)4__str__( self )Printable string representationSample Call : str(obj)5__cmp__ ( self, x )Object comparisonSample Call : cmp(obj, x)

Style Rules in CSS

Sreemaha
Updated on 30-Jan-2020 07:22:37

6K+ Views

CSS comprises of style rules interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts −Selector -  A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.Property - A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color, border etc.Value - Values assigned to properties. For example, the color property can have value either red or #F1F1F1 etcYou can put CSS Style Rule Syntax as ... Read More

Universal Selectors in CSS

radhakrishna
Updated on 30-Jan-2020 07:21:53

748 Views

A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.With the type selector, set for HTML tags like h1, h2, h3, p, etc:h2 {    color: #FFFF00; }Rather than selecting elements of a specific type, the universal selector simply matches the name of any element type:* {    color: #FFFF00; }

Comparison of CSS Versions

Lakshmi Srinivas
Updated on 30-Jan-2020 07:21:17

2K+ Views

Cascading Style Sheets, level 1 (CSS1) was came out of W3C as a recommendation in December 1996. This version describes the CSS language as well as a simple visual formatting model for all the HTML tags.CSS2 became a W3C recommendation in May 1998 and builds on CSS1. This version adds support for media-specific style sheets e.g. printers and aural devices, downloadable fonts, element positioning, and tables.CSS3 became a W3C recommendation in June 1999 and builds on older versions CSS. it has divided into documentation is called as Modules and here each module having new extension features defined in CSS2.CSS3 is ... Read More

Overloading Operators in Python

Mohd Mohtashim
Updated on 30-Jan-2020 07:21:12

618 Views

Suppose you have created a Vector class to represent two-dimensional vectors, what happens when you use the plus operator to add them? Most likely Python will yell at you.You could, however, define the __add__ method in your class to perform vector addition and then the plus operator would behave as per expectation −Example Live Demo#!/usr/bin/python class Vector:    def __init__(self, a, b):       self.a = a       self.b = b    def __str__(self):       return 'Vector (%d, %d)' % (self.a, self.b)    def __add__(self, other):       return Vector(self.a + other.a, self.b + other.b) v1 = ... Read More

Apply CONCAT Function on MySQL Table Columns

Manikanth Mani
Updated on 30-Jan-2020 07:20:26

208 Views

We can use CONCAT() function to combine the values of two or more columns. In this case, the arguments of the CONCAT() functions would be the name of the columns. For example, suppose we have a table named ‘Student’ and we want the name and address of the student collectively in one column then the following query can be written −mysql> Select Id, Name, Address, CONCAT(ID, ', ', Name, ', ', Address)AS 'ID, Name, Address' from Student; +------+---------+---------+--------------------+ | Id   | Name    | Address | ID, Name, Address  | +------+---------+---------+--------------------+ | 1    | Gaurav  | Delhi   ... Read More

Use CONCAT Function with MySQL WHERE Clause

Anjana
Updated on 30-Jan-2020 07:18:40

3K+ Views

Suppose from the table ‘Student’ we want to concatenate the values of columns, ‘Name’, ‘Address’ and ‘Columns’, based on the condition that is also a concatenation of values from columns, ’Name’, ‘Subject’, provided in WHERE clause with the help of CONCAT() function. We can use the following query to give the output −mysql> Select CONCAT(Name, ' ', 'Resident of', ' ', Address, ' ', 'is', ' ', 'Studying', ' ', Subject)AS 'Detail of Student' from Student WHERE CONCAT(Name, Subject) = "AaravHistory"; +----------------------------------------------+ | Detail of Student                            | ... Read More

Destroying Objects and Garbage Collection in Python

Mohd Mohtashim
Updated on 30-Jan-2020 07:16:43

1K+ Views

Python deletes unneeded objects (built-in types or class instances) automatically to free the memory space. The process by which Python periodically reclaims blocks of memory that no longer are in use is termed Garbage Collection.Python's garbage collector runs during program execution and is triggered when an object's reference count reaches zero. An object's reference count changes as the number of aliases that point to it changes.An object's reference count increases when it is assigned a new name or placed in a container (list, tuple, or dictionary). The object's reference count decreases when it's deleted with del, its reference is reassigned, or ... Read More

Advertisements