HTML & CSS Documentation

Overview

HTML (Hyper Text Markup Language) structures web content, while CSS (Cascading Style Sheets) styles it. Together, they form the foundation of all modern web pages.

Getting Started

To begin,create a simple HTML file and style it with a CSS file.


                <DOCTYPE html>
                <html>
                <head>
                 <link rel="stylesheet" href="style.css">
                 </head>
                 <body>
                  <h1>Hello World</h1>
                 </body>
                </html>
            
HTML Syntax

HTML is composed of elements. Each element uses tags to define content.

eaxample code:

<p> A paragraph </p>
<a href="https://eaxample.com"> A link </a>
            

CSS Syntax

CSS consists of selectors and declarations.

eaxample code:

p {
 color: blue;
 font-size: 16px;
}   
            
CSS Selectors
CSS Box Model

All HTML elements are considered as boxes

CSS Flexbox

Flexbox makes layout tasks easier:

eaxample code:

.container {
  display: flex;
  justify-content: space-between;
  align-items: center; 
}
            
Troubleshooting
Resources