HTML and CSS Basics
What is HTML
HTML (Hypertext Markup Language) is a markup language used to create web pages. With it, we can publish and read text, images, and videos on the internet.
How It Works
HTML is used to exchange information on the internet; to do so, we must give precise instructions to the browser.
Basic Page Structure
For an HTML page to work correctly, three fundamental tags are needed:
- Html: contains all other tags
- Head: contains information not visible on screen
- Body: contains all information visible on screen
Semantic Tags
Semantic HTML tags are elements that define the content of a web page in a clear and meaningful way.
The Box Model
The HTML box model defines how elements are arranged and displayed. Every element is a rectangle with content, padding, border, and margin.
CSS
CSS (Cascading Style Sheets) is a language for describing the visual appearance of a web page: layout, colors, fonts, and dimensions.
CSS Classes
CSS classes are a way to assign style properties to groups of similar HTML elements.
Responsive Sites and Media Queries
Media queries allow defining specific CSS rules for different screen sizes.