Posts

Introduction to CSS | Part 1 | Build Your Own Static Website | Cheat Sheet

Image
  HTML Elements 1. Container Element The HTML div element defines a container. <div>   <h1>Tourism</h1>   <p>Plan your trip wherever you want to go</p>   <button>Get Started</button> </div> CSS Properties 2. Syntax selector {   property1: value1;   property2: value2; } 3. Text Align The CSS text-align property specifies the horizontal alignment of the text in an HTML element. .h-center {   text-align: center; } example:- HTML Code:- <!DOCTYPE html> <html>   <head></head>   <body>     <div class="h-center">       <h1>Tourism</h1>       <p>Plan your trip wherever you want to go</p>       <button>Get Started</button>     </div>   </body> </html> CSS Code:- .h-center {   text-align: center; } Output:-

Introduction to HTML | Build Your Own Static Website | Cheat Sheet

Image
  1. Basic Structure The basic structure of any HTML document is as follows: <!DOCTYPE html> <html>   <head></head>   <body>     Your code goes here   </body> </html> 2. Heading Element The HTML   h1 element defines a main heading. <h1>Tourism</h1> 3. Paragraph Element The HTML p element defines a paragraph. <p>Plan your trip wherever you want to go</p> 4. Button Element The HTML button element defines a button. <button>Get Started</button> example:- HTML Code:- <!DOCTYPE html> <html>   <head></head>   <body>     <h1>Tourism</h1>     <p>Plan your trip wherever you want to go</p>     <button>Get Started</button>   </body> </html> Output:-