Tailwind CSS is one of the most popular CSS Framework.
Unlike Bootstrap, Tailwind CSS is a utility-first framework, i.e. it provides a set of pre-defined utility classes like flex, pt-4, text-center and rotate-90 that you may use to build your own user interfaces.
Let's see a simple "Hello World!" example to get started.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<title>Tailwind CSS Hello, World!</title>
</head>
<body>
<div class="bg-blue-500 text-white p-4">
<h1 class="text-4xl font-bold">Example Tailwind CSS - Code2care</h1>
<p class="text-lg mt-4">Hello World! Tailwind CSS.</p>
</div>
</body>
</html>
What's amazing is all you need to do is add <script src="https://cdn.tailwindcss.com"></script> and start using Tailwind CSS classes in your HTML code.
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- How to create a circular Image using pure CSS Code
- Horizontally Center Align tag in HTML using CSS
- Add scroll to div element in HTML Css
- Change CSS Background Opacity with Examples
- How to make text bold using CSS
- How to place two div elements next to each other
- Vertically Center Text in a DIV Element
- align image at middle of div element
- Tailwind CSS Hello World Example
- How to make div or text in html unselectable using CSS
- Only Chessboard using HTML and CSS Code Example
- Simple CSS Grid Example
- How to set CSS background-Image Property
- CSS Background Opacity with Examples
- reCAPTCHA Implementation Tutorial
- List of 32 CSS cursors web developers must know about
- How to Vertically Center Align Text in a Div using CSS Code Example
- 10 Must Know CSS Border Styles with Examples
- Tutorial : Simple Lightweight Pure CSS based Vertical Navigation Menu
- CSS: Apply opacity only for div background and not text
- Set Falling Show on Website for Christmas using Pure CSS Code
- How to make jsfiddle bootstrap ready
- Elegant CSS Box Shadows Ideas
- Responsive Web Design with CSS Media Queries: A Beginner's Tutorial [Updated for 2023]
- How to Center Align Image in Bootstrap
More Posts:- Command to display epoch time Terminal - Linux
- 4 Open Source SQLite Editor for Mac OS X , Windows and Linux - Mac-OS-X
- How to Connect to Azure AD Account using PowerShell on Mac - Powershell
- Program 11: Calculate Percentage - 1000+ Python Programs - Python-Programs
- How to get list of all Java versions installed on macOS - Java
- How to Set SQL Language Syntax Highlighting in Notepad++ - NotepadPlusPlus
- MacoOS - xyz is an app downloaded from the internet. Are you sure you want to open it? Alert - MacOS
- Know Mac Model Number using Terminal - MacOS