In this tutorial, we’ll walk through building a “Coming Soon” page using HTML and CSS step by step. This is perfect for beginners looking to understand how HTML and CSS work together to create beautiful designs.
Here’s a preview of what we will be creating: a coming soon page for theuicode.com with a modern design and a notification sign-up form.
Table of Contents
- HTML Structure
- Styling with CSS
- Container Layout
- Background and Box Styling
- Adding Text and Titles
- Circle and Glow Effect
- Notification Section
- Input and Button Styling
- Final Thoughts
1. HTML Structure
HTML (HyperText Markup Language) forms the backbone of any webpage. Let’s first break down the structure.
Code:
Explanation:
- DOCTYPE: Declares the document type, in this case, HTML5.
<html lang="en">
: The opening tag of the HTML document, specifying that the language is English.<meta charset="UTF-8">
: Ensures the page uses the UTF-8 character encoding.<meta name="viewport">
: Makes the page responsive, adjusting its size to fit different devices.<link rel="stylesheet" href="style.css">
: Links to an external CSS file namedstyle.css
, where all our styling will reside.<div class="container">
: A container div that will hold all the content.<div class="bg">
: Another div, which acts as the background for the “Coming Soon” section.<h3 class="six-caps-regular small-title">SINGULARITY</h3>
: This is the small title in uppercase letters.<div class="circle-row">
: This div contains the glowing circle and the text “COMING SOON”.<div class="notify-section">
: This div contains the notification sign-up section with an email input and button.
2. Styling with CSS
The next step is to style the page using CSS (Cascading Style Sheets). Here’s the linked CSS code:
We import two fonts: Nunito Sans for a modern sans-serif look and Six Caps for a bold, uppercase title font.
3. Container Layout
Now, we define the layout for the page. We’ll center the content both vertically and horizontally.
Explanation:
- html, body: We reset the default margin and padding of the page.
- box-sizing: Ensures that padding and border are included in the element’s total width and height.
- .container: This creates a full-page background with a gradient and uses Flexbox to center its content.
4. Background and Box Styling
We add a box where all the content will be displayed.
Explanation:
- .bg: This is a fixed-size box with a dark background and shadow, adding depth to the design.
5. Adding Text and Titles
Next, we add the titles: “SINGULARITY” and “COMING SOON.”
.small-title {
letter-spacing: 5px;
font-size: 20px;
color: #F2F2F3;
padding-left: 20px;
}
.title {
color: #F2F2F3;
font-weight: 800;
font-size: 20px;
letter-spacing: 35px;
position: absolute;
bottom: 240px;
}
Explanation:
- .small-title: This styles the “SINGULARITY” text, spacing out the letters for a more modern look.
- .title: This styles the “COMING SOON” text with bold, large letters and added spacing.
6. Circle and Glow Effect
We create a circular background with a glowing effect using CSS gradients.
Explanation:
- .circle: A solid circle with a gradient background.
- .circle-glow: A glowing circle behind the main circle, adding visual interest with a gradient and blur effect.
7. Notification Section
This section allows users to sign up for notifications.
Explanation:
- .notify-section: Centers the notification section and positions it below the main circle.
- .notify-label: Styles the “GET NOTIFIED” text.
8. Input and Button Styling
Finally, we style the input field and notification button.
Explanation:
- input.email: Styles the email input field with a dark background and curved borders.
- .notify-btn: Creates a gradient button with a hover effect.
9. Final Thoughts
With this tutorial, you’ve learned how to create a beautiful “Coming Soon” page using HTML and CSS. By combining layout techniques with CSS gradients and Flexbox, you can design attractive and functional landing pages.
0 Comments