- HTML (Hypertext Markup Language): HTML is the standard markup language for creating web pages. It provides the structure and layout for the content on a webpage. Here's an example of a basic HTML structure:
References: MDN Web Docs - HTML<!DOCTYPE html> <html> <head> <title>My Webpage</title> </head> <body> <h1>Welcome to My Webpage</h1> <p>This is a paragraph of text.</p> </body> </html>
- CSS (Cascading Style Sheets): CSS is used to style and format the HTML content. It allows you to control the appearance of elements on a webpage. Here's an example of CSS code to change the color of all paragraphs to red:
References: MDN Web Docs - CSSp { color: red; }
- JavaScript: JavaScript is a programming language that adds interactivity and dynamic behavior to web pages. It can be used to manipulate HTML elements, handle events, and perform calculations. Here's an example of a JavaScript function that changes the text of a paragraph:
References: MDN Web Docs - JavaScriptfunction changeText() { document.getElementById("myParagraph").textContent = "New text!"; }
- Responsive Design: Responsive design is an approach to web design that aims to provide an optimal viewing experience across different devices and screen sizes. It involves using CSS media queries and flexible layouts to adapt the content to the user's device. Here's an example of a media query that changes the font size for smaller screens:
References: MDN Web Docs - Responsive Design@media screen and (max-width: 600px) { body { font-size: 14px; } }
- Bootstrap: Bootstrap is a popular CSS framework that provides pre-designed components and styles to build responsive web pages quickly. It includes a grid system, typography, forms, buttons, and more. Here's an example of using Bootstrap classes to create a responsive navigation bar:
References: Bootstrap Official Website<nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="#">My Website</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav"> <li class="nav-item active"> <a class="nav-link" href="#">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="#">About</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Contact</a> </li> </ul> </div> </nav>
© 2024 Invastor. All Rights Reserved
User Comments
User Comments
There are no comments yet. Be the first to comment!