Related Topics
Introduction
CSS Page 1
CSS Page 2
CSS Page 3
CSS Page 4
CSS Selectors and the Box Model
CSS Page 5
CSS Page 6
CSS Page 7
CSS Layout and Display Properties
CSS Page 8
CSS Page 9
CSS Page 10
CSS Page 11
CSS Text and Font Properties
CSS Page 12
CSS Page 13
CSS Page 14
CSS Page 15
CSS Backgrounds and Borders
CSS Page 16
CSS Page 17
CSS Page 18
CSS Page 19
CSS Page 20
CSS Colors and Transparency
CSS Page 21
CSS Page 22
CSS Page 23
CSS Page 24
CSS Gradients and Shadows
CSS Page 25
CSS Page 26
CSS Transformations and Animations
CSS Page 27
CSS Page 28
CSS Page 29
CSS Flexbox and Grid Layout
CSS Page 30
CSS Page 31
CSS Page 32
CSS Media Queries and Responsive Design
CSS Page 33
CSS Page 34
CSS Page 35
CSS Transitions and Transforms
CSS Page 36
CSS Page 37
CSS Page 38
CSS Preprocessors (Sass, Less, etc.)
CSS Page 39
CSS Page 40
CSS Page 41
CSS Best Practices and Debugging Techniques.
CSS Page 42
CSS Page 43
CSS Page 44
Introduction
Html page 1
Html page 2
Html page3
Html page4
HTML Elements and structure
Html page 5
Html page 6
Html page 7
HTML Headings and Paragraphs
Html page 8
Html page 9
Html page 10
HTML Lists and Tables
Html page 11
Html page 12
Html page 13
HTML Forms and Input Fields
Html page 14
Html page 15
Html page 16
HTML Images and Media
Html page 17
Html page 18
HTML Links and Anchors
Html page 19
Html page 20
Html page 21
HTML Styles and Formatting
Html page 22
HTML Semantic Elements
Html page 23
Html page 24
HTML Attributes
Html page 25
Html page 26
HTML JavaScript Integration
Html page 27
Html page 28
Html page 29
Html page 30
HTML Document and Browser Support
Html page 31
Html page 32
HTML5 New Elements and Attributes
Html page 33
Html page 34
Html page 35
Html page 36
HTML Accessibility and Web Standards
Html page 37
Html page 38
Html page 39
HTML Responsive Design and Mobile Devices.
Html page 40
Html page 41
Html page 42
Introduction
Data Structure Page 1
Data Structure Page 2
Data Structure Page 3
Data Structure Page 4
Data Structure Page 5
Data Structure Page 6
Data Structure Page 7
Data Structure Page 8
String
Data Structure Page 9
Data Structure Page 10
Data Structure Page 11
Data Structure Page 12
Data Structure Page 13
Array
Data Structure Page 14
Data Structure Page 15
Data Structure Page 16
Data Structure Page 17
Data Structure Page 18
Linked List
Data Structure Page 19
Data Structure Page 20
Stack
Data Structure Page 21
Data Structure Page 22
Queue
Data Structure Page 23
Data Structure Page 24
Tree
Data Structure Page 25
Data Structure Page 26
Binary Tree
Data Structure Page 27
Data Structure Page 28
Heap
Data Structure Page 29
Data Structure Page 30
Graph
Data Structure Page 31
Data Structure Page 32
Searching Sorting
Data Structure Page 33
Hashing Collision
Data Structure Page 35
Data Structure Page 36

CSS
ul {
list-style-type: square;
}
ol {
list-style-type: decimal;
}
List Item Styling: You can apply styles directly to list items using their respective selectors (
<li>
,<dt>
,<dd>
). This allows you to control properties such as color, padding, margin, and background.
Example:
li {
color: blue;
padding-left: 20px;
}
Tables: To style HTML tables, you can use various CSS properties to control the table layout, borders, spacing, and cell styling.
Table Layout: Use the
table-layout
property to control how the table should be displayed. Common values includeauto
(default, based on content),fixed
(columns have equal width), andinherit
(inherits from parent).
Example:
table {
table-layout: fixed;
}
Borders and Spacing: Apply border and spacing styles using properties such as
border
,border-collapse
,border-spacing
,padding
, andmargin
. These properties allow you to control the appearance of the table borders and the spacing between cells.
Example:
table {
border-collapse: collapse;
border: 1px solid black;
margin: 10px;
padding: 5px;
}
Cell Styling: Use CSS selectors to target specific table cells (
<td>
or<th>
) and apply styles accordingly. This allows you to customize properties like background color, text alignment, font, and more.
Example:
td {
text-align: center;
background-color: lightgray;
}
Other Complex Structures: For more complex structures, such as grids or multi-column layouts, you can use CSS frameworks like Bootstrap, Flexbox, or CSS Grid. These frameworks provide a set of pre-defined classes and layout systems that simplify the creation of complex structures.
Bootstrap Example:
<div class="container">
<div class="row">
<div class="col-md-6">Column 1</div>
<div class="col-md-6">Column 2</div>
</div>
</div>
In this example, the Bootstrap grid system is used to create a two-column layout.
Remember, these examples provide a starting point, and you can further customize the styles based on your specific design requirements. CSS offers a wide range of properties to control the appearance and layout of various complex structures, allowing you to create visually appealing and functional designs.
@media media-type and (media-feature) {
/* CSS styles to apply */
}
Targeting Screen Sizes: One common use of media queries is to target different screen sizes. For example, you can apply different styles for small screens, medium screens, and large screens. The
min-width
andmax-width
media features are commonly used for this purpose.
/* Styles for screens larger than or equal to 768px */
@media screen and (min-width: 768px) {
/* CSS styles to apply */
}
/* Styles for screens smaller than 768px */
@media screen and (max-width: 767px) {
/* CSS styles to apply */
}
Targeting Device Types: Media queries can also target specific device types such as screens, print devices, or handheld devices. You can use the
type
media feature to specify the target device type.
/* Styles for screens */
@media screen {
/* CSS styles to apply */
}
/* Styles for print */
@media print {
/* CSS styles to apply */
}
/* Styles for handheld devices */
@media handheld {
/* CSS styles to apply */
}
Combining Media Features: You can combine multiple media features within a media query to create more specific targeting. For example, you can apply styles only to devices with both a specific screen size and orientation.
/* Styles for devices with a width of 768px and landscape orientation */
@media screen and (width: 768px) and (orientation: landscape) {
/* CSS styles to apply */
}
Nested Media Queries: Media queries can be nested inside one another to create more complex targeting and styles. This allows you to apply styles based on multiple conditions.
/* Styles for screens larger than or equal to 768px and smaller than 1200px */
@media screen and (min-width: 768px) and (max-width: 1199px) {
/* CSS styles to apply */
/* Nested media query for screens smaller than 992px within the larger range */
@media screen and (max-width: 991px) {
/* Additional CSS styles to apply */
}
}
Media queries provide a powerful tool for creating responsive designs by selectively applying styles based on the characteristics of the device or viewport. By using media queries effectively, you can ensure that your website adapts and looks great on various screen sizes, resolutions, and device types.




Popular Category
Topics for You
Introduction
Html page 1
Html page 2
Html page3
Html page4
HTML Elements and structure
Html page 5
Html page 6
Html page 7
HTML Headings and Paragraphs
Html page 8
Html page 9
Html page 10
HTML Lists and Tables
Html page 11
Html page 12
Html page 13
HTML Forms and Input Fields
Html page 14
Html page 15
Html page 16
HTML Images and Media
Html page 17
Html page 18
HTML Links and Anchors
Html page 19
Html page 20
Html page 21
HTML Styles and Formatting
Html page 22
HTML Semantic Elements
Html page 23
Html page 24
HTML Attributes
Html page 25
Html page 26
HTML JavaScript Integration
Html page 27
Html page 28
Html page 29
Html page 30
HTML Document and Browser Support
Html page 31
Html page 32
HTML5 New Elements and Attributes
Html page 33
Html page 34
Html page 35
Html page 36
HTML Accessibility and Web Standards
Html page 37
Html page 38
Html page 39
HTML Responsive Design and Mobile Devices.
Html page 40
Html page 41
Html page 42
Introduction
Data Structure Page 1
Data Structure Page 2
Data Structure Page 3
Data Structure Page 4
Data Structure Page 5
Data Structure Page 6
Data Structure Page 7
Data Structure Page 8
String
Data Structure Page 9
Data Structure Page 10
Data Structure Page 11
Data Structure Page 12
Data Structure Page 13
Array
Data Structure Page 14
Data Structure Page 15
Data Structure Page 16
Data Structure Page 17
Data Structure Page 18
Linked List
Data Structure Page 19
Data Structure Page 20
Stack
Data Structure Page 21
Data Structure Page 22
Queue
Data Structure Page 23
Data Structure Page 24
Tree
Data Structure Page 25
Data Structure Page 26
Binary Tree
Data Structure Page 27
Data Structure Page 28
Heap
Data Structure Page 29
Data Structure Page 30
Graph
Data Structure Page 31
Data Structure Page 32
Searching Sorting
Data Structure Page 33
Hashing Collision
Data Structure Page 35
Data Structure Page 36
Go through our study material. Your Job is awaiting.