DEV Community

Ezhil Abinaya K
Ezhil Abinaya K

Posted on

Understanding Basic HTML & CSS Concepts for Beginners

While learning Full Stack Web Development, I explored some important HTML and CSS concepts that help in building clean and responsive websites.
Global Selector (*)
The global selector is used to apply styles to all elements in a webpage.
{
margin: 0;
padding: 0;
box-sizing: border-box;
}
It helps maintain consistent spacing and layout throughout the website.
**Anchor Tag
*
The anchor tag is used to create links in HTML.

href stands for Hypertext Reference.
Margin vs Padding
Both are used for spacing, but they work differently.
Margin: Space outside the element.
Padding: Space inside the element.
Box Sizing: Border Box
box-sizing: border-box makes width and height include padding and border.This helps avoid layout issues and makes responsive design easier.
Types of Elements
1.Block Level Element:Block elements take the full width available and always start on a new line.
Example:

2.Inline Element: Inline elements take only the required width and stay in the same line.
Example:

nav tag

Types of Lists
1.Ordered List: An ordered list displays items in a numbered format.
2.Unordered List: An unordered list displays items using bullet points.

Top comments (0)