Posts

Showing posts with the label html

Create your first website with Home, Contact us, Register, Login Pages

Image
Create a Folder Structure for Your Website 1. Create a folder named MyFirstWebsite . 2. Inside the MyFirstWebsite folder, create the following HTML files: index.html (Home page) contact.html (Contact Us page) register.html (Registration page) login.html (Login page) MyFirstWebsite/ │ ├── index.html ├── contact.html ├── register.html ├── login.html └── main.css Note: why the main HTML file is named index.html 1. Default Behavior: Most web servers automatically serve index.html when a directory is accessed (e.g., http://example.com/). 2. Organizational Convention: It clearly indicates the starting point of a website, making projects easier to navigate. 3. SEO and Usability: Enhances usability for users and search engines by providing a clear homepage. 4. Historical Context: This naming convention has been widely accepted since the early days of the web. Using index.html ensures compatibility with hosting services and improves site navigation. File Content index.html <!DOCTYPE html>

CSS: An Easy Introduction to Beginners

Image
W hat is CSS CSS, or Cascading Style Sheets, is a language used to style the appearance of web pages. Imagine a web page without CSS – it would just be plain text. CSS is what makes websites look visually appealing by adding colors, layouts, fonts, and other design elements. Here is the example. The area labeled "HTML ONLY" shows how your website will seem if you use simply HTML, while the portion labeled "HTML WITH CSS" shows how your website will appear if you use HTML along with CSS. Cool right! Syntax of CSS (CSS in External file or Internal) Selector {     Property1: Value     Property2: Value } EX: p {     color: blue;     font-size: 24px; } Syntax of CSS (Inline) <span style="property1: value; property2: value;"></span> EX: <span style=" color: red; font-size: 40px; "></span> what is selectors? CSS selectors allow you to target specific HTML elements. You can select elements by tag name (e.g., h1, p), class (e.g., .