MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

CSS Tutorial-Part 2

List=> List property is used to create a list. There are two types of lists:
. Unordered lists- An unordered list uses bulleted as the list item markers. Ordered lists – An ordered list uses numbers or letters as the list item markers.

List-style-image- In this, an image is used as the list item marker. We can set this property to none or a web address of an image.

Ex-

List-style-position- It specifies the position of the list item marker. you can set this property to either inside or outside.

Ex-

list-style=> It is a shorthand property for list-style-type, list-style-image and list-style- position.

Ex-

Order: list-style-type, list-style-position, list-style-image.

border-style=> This property sets border style of an element. We can set this property to none, hidden, dashed, solid, double, groove, ridge, inset, outset.

Ex-

Border-width=> It sets width of element’s border. We can set this property to thin, medium, thick, length in the form of px.

Ex-

Border-color=> It sets color of border. We can set this property to transparent and color value.

Ex-

Table= . border, border-collapse, border-spacing, caption-side, empty-cells, table-layout,

For specifying table we use border property.
Ex- table, th, td {boder: 2 px solid blue;}

This property sets whether the table borders are collapsed into a single border or detached. We can set a property to separate (default)and collapse.
Ex- table {border-collapse:collapse;}

This property sets whether the table borders are collapsed into a single border or detached. We can set a property to separate (default)and collapse.
Ex- table {border-collapse:collapse;}

Ex-

This property is used to place a caption for the table. We can set this property to top (default) or bottom.

Ex-

Empty-cells= This Property is used to set whether or not to display borders and background on empty cells in a table.it will work only if the border-collapse is set to separate. we can set this property to show (default) or hide.

Ex-

table-layout= This property is used to set table layout. We can set this property either auto (default) or fixed.

Ex-

How to set Table width and Height- we use width and height property to set table width and height.
We can also set table heading (th) width and heading.

table {width:100%;}
th {height:10px;}

How to set Table Padding- This property is used to control the space between the border and the content in a table, this is used on and elements. th, td
{padding:10px;}

How to set Table color-

Display- this property is used to define how an element should display. Every HTML element has a default display value depending on what type of element it is. The default display value for most elements is block or inline.

inline, block, flex, inline-block, inline-flex, inline-table, list-item, run-in, table, table-row-group, table-caption, table-column-group, table-header-group, table-footer-group, table-cell, table-column, table-column, table-row, none.

Display- block-level Elements- A Block-level element always start on a new line and takes up the full width available.

Visibility- This property is used to specify whether or not an element is visible. We can set this property to visible (default), hidden or collapse.

Collapse- This value is only used for table elements. collapse removes a row or column, but it does not affect the table layout. The space taken up by the row or column will be available for content. If the collapse is used on other elements, it will be treated as “hidden”.

Link-
a: link-a normal, unvisited link
a: visited-a link the user has visited
a: hover-a link when the user mouse over it
a: active-a link the moment it is clicked

Ex-

a: hover MUST come after a: link a: visited
a: active must come after a: hover

=> Position-

  • static, fixed, relative, absolute, left, right, top, bottom

Static- when we set static for an element then it is not positioned in any special way, it is always positioned according to the normal flow of the page.

left, right, top and bottom property won’t work with the static position.
Ex:-

overflow- This property is used to define what happens if content overflows an element’s box. it means it will define whether to clip content or to add scrollbars when an element with a specified height. we can set this property to visible (default). scroll, hidden, auto.
Ex-

Float- This property is used to specify that an element should be placed along the left or right side of its container, where text and inline elements will wrap around it. We can this property to left, right, none (default).

Ex-

=> div and span=
– The div is used to group various other HTML elements. It is a block-level element. We can say it also creates a block.

=> – The span tag is used to group inline elements. It is an inline element.

!important

Pseudo-classes= A pseudo-class is used to define a special state of an element.
Syntax:- selector:pseudo-class {property:value;}

Ex:-

Content- It is used to generated content at run time dynamically with the ::before and :: after pseudo-elements, to inset generated content.
Ex:-

Pseudo Element- This is used to style specified parts of an element.
Syntax:-
Selector:: pseudo-element {property:value;}
Ex:-

Selection- this is used to matches the portion of an element that is selected by a user then apply the CSS rule in the selected content.
– background properties
– color properties
– cursor properties
– outline properties

Ex:-

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

WordPress Typography Patterns: Styled Lists, Notice Boxes, and Code Blocks with Reusable CSS

This guide modernizes a legacy WordPress typography post into practical, reusable patterns for custom list markers, callout boxes, and code styling. It focuses on maintainable CSS and editor-friendly markup you can reuse across posts and documentation pages.

Read More

What to choose: front-end or backend development?

Regarding web development, two main areas play a crucial role in creating a functional and visually appealing website: frontend and backend development. Frontend development focuses on the…

Read More

The Ultimate Tech Stack Blueprint for Building Large-Scale Static Websites with Astro

Final recommended stack That is the stack I would choose over the Bootstrap variants unless your existing HTML is already heavily Bootstrap-based. Your best stack should be:…

Read More

Building the Virtual Classroom: An Introduction to HTML5 Layouts for Online School Portals

To build a virtual classroom, you need to grasp HTML5 layouts. Use semantic elements like <header>, <nav>, <section>, and <footer> for better accessibility and SEO. Make certain…

Read More

Senior Design Systems Engineer: Role Blueprint, Responsibilities, Skills, KPIs, and Career Path

A **Senior Design Systems Engineer** is a senior individual contributor who designs, builds, and operates the technical foundation of a company’s design system—typically including UI component libraries, design tokens, documentation, tooling, and integration patterns—so product teams can ship consistent, accessible, high-quality user experiences at speed. The role sits at the intersection of design and engineering and focuses on creating scalable UI primitives and developer experience (DX) that enable many teams to deliver cohesive interfaces across products and platforms.

Read More

Design Systems Engineer: Role Blueprint, Responsibilities, Skills, KPIs, and Career Path

A **Design Systems Engineer** builds and maintains the shared UI foundation that enables product teams to ship consistent, accessible, high-quality user experiences at scale. The role combines frontend engineering, systems thinking, and close partnership with design to create reusable components, patterns, tokens, and documentation that accelerate delivery across multiple products and teams.

Read More