Creating a personal website is an excellent way to showcase your skills, portfolio, and personality online. Two fundamental languages that drive the look and feel of your website are HTML and CSS. This tutorial will guide you through the basics of HTML and CSS, helping you create a simple yet engaging personal website.

Before we dive into the nitty-gritty, let's understand what HTML and CSS are. HTML, or HyperText Markup Language, is the standard markup language for creating web pages. It provides the structure and content of your webpages. CSS, or Cascading Style Sheets, is used to style the look and layout of your webpages, separating presentation from content.

HTML Basics
HTML uses tags to define elements on a webpage. These tags are enclosed in angle brackets (<>). Here are some essential HTML tags:

- <!DOCTYPE html>: This declaration helps with browser compatibility.
- <html>: The root element of an HTML page.
- <head>: Contains meta-information about the HTML document, like its title and links to scripts or stylesheets.
- <title>: Specifies a title for the webpage (displayed on the browser's title bar or in the page's tab).
- <body>: Contains the visible page content, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
HTML Headings

HTML provides six levels of headings, from <h1> (most important) to <h6> (least important). Use headings to structure your content hierarchically.
Example: <h1>Welcome to My Personal Website</h1> <h2>About Me</h2> <h3>My Skills</h3> <h4>Programming Languages</h4>
HTML Lists

HTML offers two types of lists: ordered (numbered) and unordered (bulleted). Lists help organize content into easily digestible chunks.
Example: <ol> <li>First item</li> <li>Second item</li> </ol> <ul> <li>First item</li> <li>Second item</li> </ul>
CSS Basics

CSS allows you to control the layout, colors, fonts, and other visual aspects of your webpages. You can apply CSS styles either internally (within <style> tags in the <head> section) or externally (in a separate .css file linked to your HTML).
Here's a simple example of an internal CSS style:




















<style> body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; } h1 { color: #333; text-align: center; } </style>
CSS Selectors
CSS selectors target HTML elements to apply styles. Some common selectors include element type (e.g., p, h1), class (e.g., .my-class), and ID (e.g., #my-id).
Example: <p class="my-class">This paragraph has a class of "my-class"</p> <h1 id="my-id">This heading has an ID of "my-id"</h1>
CSS Box Model
The CSS box model is a fundamental concept that helps understand how CSS lays out elements on a webpage. It consists of margins, borders, padding, and content.
Example: <style> div { width: 200px; height: 100px; margin: 10px; padding: 10px; border: 1px solid black; } </style>
Now that you've learned the basics of HTML and CSS, it's time to put your knowledge into practice. Start by creating a new folder for your project, then create an HTML file and a CSS file. Begin structuring your content with HTML, and then apply styles using CSS. As you build your personal website, don't hesitate to explore more advanced topics like responsive design, JavaScript, and frameworks like Bootstrap.