STEP 1: Add <div class="parallelogram"></div> into your HTML document inside <body> section. STEP 2: Add this CSS code. .parallelogram{ width: 250px; height: 150px; background-color: black; transform: skew(-30deg); } Output The width: 250px and height: 150px give width and height to the object. The background-color: black; make the object's background color black to make it visible. Then, the transform: skew(-30deg); property skew the object in X-axis by -30degree. And the parallelogram is created using HTML and CSS.
First of all these HTML elements into your HTML document. Copy the code From Our Github <div><h1>Facebook</h1> <p>Connect with friends and the world<br> around you on Facebook.</p> </div> <div class="form"> <form action=""> <div> <input type="text" name="Username" id="Username" placeholder="Email or Phone Number"> </div> <div> <input type="password" name="Password" id="Password" placeholder="Password"> </div> <div> <input type="submit" value="Log ...
If you're new to coding, you might think Java and JavaScript are closely related just because they share "Java" in their names. But in reality, they are as different as a car and a carpet! In this blog, we'll break down the key differences between Java and JavaScript, covering everything from syntax to use cases. 1. Introduction: Java vs JavaScript Both Java and JavaScript are popular programming languages, but they serve different purposes: Java is a powerful, object-oriented programming language mainly used for backend development, Android apps, and enterprise applications. JavaScript is a lightweight, interpreted scripting language primarily used for web development to create interactive front-end experiences. Let’s dive deeper into their differences. 2. Origin and History Feature Java JavaScript Developed By Sun Microsystems (now owned by Oracle) Netscape (Brendan Eich) First Released 1995 1995 Initially Designed For Standalone applicati...
STEP 1: Add <div class="trapezium"></div> in your HTML document in the <body> section. STEP 2: Add this CSS code. .trapezium{ border-width: 100px; border-style: solid; border-color: transparent transparent black transparent; width: 200px; } Output The border-width: 100px; property gives width to the border, border-s tyle: solid; makes the border surface area solid, and border-color: transparent transparent black transparent; make the top, left, right side border transparent and keep the bottom border black which creates a triangle. Then, the width: 200px; property extends it to make a trapezium or trapezoid.
STEP 1: Add a <div class="semi-circle"></div> in the body section of an HTML document. STEP 2: Go To your CSS file and add this code. .semi-circle{ width: 150px; height: 75px; background-color: black; border-radius: 100px 100px 0 0; } Output The width: 150px; and height: 75px; gives width and height and create a rectangle. Then, background-color: black; gives color to the background so that we can see the actual rectangle created. And the last one, border-radius: 100px 100px 0 0; , it create a rounded border on the top-left and top-right corner of the rectangle. The two zeros in ( border-radius: 100px 100px 0 0 ; ) is for the border-radius for bottom-right and bottom-left and we kept it width 0 to make it look like a semi-circle.
Ever visited a website that looked great on your laptop but was a total mess on your phone? Maybe the text was too small, the images were all over the place, or buttons were impossible to click. Annoying, right? Well, that’s exactly why responsive web design is a game-changer. If you’re a web developer (or aspiring to be one), mastering responsive layouts is the secret sauce to making websites look flawless on all devices —whether it’s a massive desktop monitor, a tablet, or a tiny smartphone screen. What is a Responsive Layout? A responsive layout is a web design approach where your website automatically adjusts to fit any screen size. Instead of designing separate sites for desktop and mobile, responsive design ensures one website works everywhere. Why Does It Matter? Better User Experience (UX): No one likes zooming in and out just to read content. SEO Boost: Google ranks mobile-friendly websites higher. More C...
In this tutorial, we will learn how to create a light bulb using HTML, CSS, and JavaScript. We will go step by step, explaining the code and its functionality. By the end of this tutorial, you will have a working light bulb that can be toggled on and off with a button. HTML Markup <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Light</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <div class="light"></div> <div class="cap"></div> </div> <button id="power">OFF</button> <script src="script.js"></sc...
Are you looking to design an impressive personal portfolio website that showcases your skills, projects, and contact information? In this post, I’ll guide you through a simple yet elegant portfolio website built using HTML and CSS. Whether you’re a beginner or an experienced developer, this project can be a great addition to your web development journey. Project Overview This portfolio website is designed to highlight your personal and professional details in a clean and visually appealing way. It features multiple sections like About Me , Skills , Portfolio , and Contact Form . The design is responsive, making it accessible on all devices, including desktops, tablets, and smartphones. Features of the Portfolio Navigation Bar: Smooth navigation to all sections with a stylish hover effect. Intro Section: A bold introduction with a profile image and social links. About Me: A...