Home Services Portfolio Experience Blog Testimonials
Home Services Portfolio Experience Blog Testimonials

A List of Popular Chinese AIs

I’m a pretty simple AI user: I ask questions, get help with code, and sometimes let an AI build an entire app for me. Even though most AIs work the same way, I still use several of them. In the U.S., my main tools are Copilot, Gemini, and Cursor. If you’re curious about Chinese AIs, here’s a list of the ones I personally use and recommend — and yes, they’re all accessible outside China. There are so many others, but I have used and am mostly familiar with the ones in this list here.

  • DeepSeek

    DeepSeek is one of the newest and most talked‑about Chinese AI models — especially because it surprised everyone with how powerful it is compared to its size and cost. It’s built by a Chinese company called DeepSeek AI, and it focuses on being fast, lightweight, and extremely efficient.
  • Kimi AI

    Kimi is one of China’s most advanced AI chatbots — famous for its extremely long context window, meaning it can remember and process huge amounts of text at once. It’s built by Moonshot AI (月之暗面), a fast‑growing Chinese AI company.
  • Doubao

    Doubao is a general‑purpose AI chatbot created by ByteDance (the company behind TikTok/Douyin). It’s designed for chatting, answering questions, writing content, coding, translation, productivity tasks. It’s ByteDance’s answer to Copilot, ChatGPT, and Kimi.
  • Tongyi Qianwen

    Tongyi Qianwen (通义千问 / Tōngyì Qiānwèn) is Alibaba’s flagship AI model — basically Alibaba’s answer to ChatGPT and Copilot. It powers many of Alibaba’s products, including AliCloud, DingTalk, and e‑commerce tools used across China.
  • Ernie Bot

    ERNIE Bot (文心一言 / Wénxīn Yīyán) is Baidu’s flagship AI chatbot — basically China’s version of ChatGPT, built on Baidu’s ERNIE large‑language‑model family. It’s one of the biggest and most widely used AIs in China, especially because Baidu integrates it into search, maps, cloud services, and business tools.

Chinese Apps For The Curious

For those who are curious and are wondering what kind of Chinese apps are out there or which may be some popular ones, here is a list

  • Super Chinese


    Super Chinese is a modern, AI‑powered Mandarin app with strong tone correction, structured lessons, and a clear path from beginner to intermediate. It’s more advanced than HelloChinese and ChineseSkill, and it’s one of the best apps for serious self‑study today.

Some music apps

Two of the most popular music apps that have been in China forever. Perhaps these are the oldest:

  • QQ music (QQ音乐)


    QQ Music (QQ音乐) is one of China’s largest music‑streaming platforms. It’s owned by Tencent, the same company behind WeChat. Think of it as China’s version of Spotify + Apple Music, but with features tailored to Chinese listeners. Be careful because I think there is an English version, which I have never use. Look out for the original Chinese version only.
  • Netease Music (网易云音乐)

    Netease Music (网易云音乐) is one of China’s biggest and most influential music‑streaming platforms. If QQ Music is like Spotify, then Netease Music is more like Spotify + SoundCloud + social community combined. It’s known for its emotional atmosphere, deep comment sections, and strong indie music culture.

There are many other Chinese music apps that are big and just as popular such as Kugou Music 酷狗音乐, which is another big one and newer ones such as  Muse AI音乐, but the two I had listed above are the most used and perhaps the oldest.

Some apps to watch movies, tv shows, and quick videos

  • iQIYI (爱奇艺)

    iQIYI (爱奇艺) is one of China’s largest streaming platforms, often compared to Netflix. It focuses on movies, TV dramas, variety shows, anime, and original productions. It’s owned by Baidu, and it’s one of the “big three” Chinese video apps alongside Tencent Video and Youku. If you download this app, be careful and watch out for the Chinese version.There is also an English version made for people outside of China, but I don’t think it is as good as the original Chinese version.
  • Tecent Video (腾讯视频)

    Tencent Video is one of China’s biggest streaming platforms — essentially China’s equivalent of Netflix — offering movies, TV dramas, variety shows, anime, and documentaries. It’s owned by Tencent and launched in April 2011.
  • Youku (优酷)

    Youku is one of China’s major video‑streaming platforms — basically part of the “big three” alongside iQIYI (爱奇艺) and Tencent Video (腾讯视频). It’s owned by Alibaba Group, and it’s been around since the early days of online video in China. Maybe this is the earliest one. I am not sure. I also think you also have twitch out for an English version and the better, original, Chinese version.
  • Bili Bili (哔哩哔哩)

    Bilibili is one of China’s biggest and most unique video platforms — often described as China’s YouTube + Crunchyroll + Twitch + Reddit combined. It started as an anime community and grew into a massive cultural hub for young people.

CCTV (中央电视台)

CCTV is China Central Television, the national state‑run broadcaster of the People’s Republic of China. It’s the largest and most influential TV network in the country, operating dozens of channels covering news, documentaries, entertainment, sports, and international programming.

Personally, CCTV is one of my favorites. It’s free, easy to access, and its content is widely available — many of their channels even upload broadcasts to YouTube.

CCTV isn’t an app outside of China; you simply access it through a web browser. Inside China, it’s just regular public television that people watch when they turn on their TVs.

I find a lot of good movies on CCTV‑6, and CCTV‑8 has tons of TV dramas. CCTV‑8 isn’t usually available outside China unless you use a reliable VPN, but you can still find plenty of CCTV‑8 content on YouTube.

If you want to explore it yourself, just open your browser and try one of their official channels.

Some social media apps

Of course, there are the obvious ones — WeChat and Alipay — but I won’t dwell on them here. For people outside of China, especially those who have never lived there, these apps aren’t very useful. Inside China, they’re essential for daily life: communicating with coworkers and family, sending and receiving money, paying bills, and handling almost every part of modern living.

They do have entertainment features like mini‑games, TikTok‑style video feeds, livestreams, and articles, but their full functionality really shines only when you’re physically in China.

From what I’ve seen, opening an account outside China can be a bit difficult. But if you’re up for a challenge — and a little adventure — you can give it a try.

There are so many Chinese social media apps that are really popular so I will only name the few that I am most familiar with.

Douyin (抖音)

抖音 (Dǒuyīn) is the Chinese version of TikTok — in fact, it’s the original app that TikTok was built from.

It is different from the TikTok here is some ways. It has:

Local services integration — food delivery, hotel booking, maps, and shopping inside the app.

E‑commerce features — creators can sell products directly in videos.

Chinese‑only content — dramas, livestreams, news, and influencers specific to China.

Stronger parental controls — mandatory youth mode for minors.

Different algorithm behavior — tuned for Chinese culture and trends.

抖音 is more like TikTok + Instagram + Amazon + Meituan (Chinese Uber Eats, Uber) combined.

Kuaishou (快手)

Kuaishou (快手 / Kuàishǒu) is one of China’s biggest short‑video and livestreaming platforms — often described as Douyin’s (TikTok’s) “grassroots” competitor.”

Kuaishou is a short‑video social media app created in 2011. It focuses heavily on:

  • everyday life
  • rural culture
  • working‑class stories
  • livestreaming
  • e‑commerce
  • community interaction

It’s known for being authentic, down‑to‑earth, and less polished than Douyin.

It’s extremely popular, especially outside major cities, and has a very different vibe compared to Douyin. Difficult to access outside of China though. They have an international version that I have never used. I am sure it is not as good as the Chinese version though.

Xiaohongshu (小红书 / Xiǎohóngshū)

Xiaohongshu is a lifestyle social media + e‑commerce platform. It is one of China’s most important social media apps — often described as China’s Instagram + Pinterest + TikTok + Yelp all in one. It’s a lifestyle‑sharing platform built around photos, short videos, reviews, and personal recommendations.

It’s extremely popular among young people in China and very accessible to users outside China. I use this daily and I highly recommend it.

Tantan (探探 / Tàntàn)

Tantan is one of China’s most popular dating apps — basically China’s Tinder. It’s built around swiping, matching, chatting, and short video profiles, and it’s widely used in big cities by young adults.

HelloTalk

If you are interested in learning Chinese. This is the best.

is one of the most popular language‑exchange social apps in the world — and in China it’s especially famous because millions of Chinese people use it to talk with foreigners.

It’s basically a social network for learning languages, built around chatting, voice messages, video calls, and cultural exchange.

How I learned Chinese

I’ve been studying Chinese for a long time now — at the time of writing this, about eight years. By normal standards, maybe I’m fluent, but my personal definition of fluency is much stricter: native‑level understanding, knowing every word, and being able to read and write thousands of characters. Because of that, I still study Chinese almost every day. It’s been a fun and interesting journey, and I’ve made a lot of friends along the way. Today, I want to share how that journey began.

Without diving into the long version of the story, I’ll start with the moment everything changed. One day, I stumbled across an opportunity to live in China and teach English. As soon as I knew I was going — about a month or two before the actual move — I started studying Chinese. At first, I didn’t know where to begin. I explored articles online, tried random apps I found in the Microsoft Store, and experimented with anything that looked helpful. Eventually, I settled on an app called HelloChinese, and for a while, I used it exclusively.

In the beginning, I wasn’t very strict with myself. I did one lesson a day — maybe five minutes of studying. My goal wasn’t to rush through the app; I wanted to actually memorize the sentences and words I was learning. Five to ten new words a day was enough to keep me challenged for a while.

Before I came to China, I mostly studied during my bus rides to and from work. When I finally moved to China, I shifted my routine and started studying first thing in the morning, sometimes while still lying in bed. The app helped me a lot during that time, and I wasn’t shy about using the words I learned in real life.

I remember the moment I realized I was making real progress. I had just finished the lesson about giving directions. One night, I was out shooting pool with a friend — another foreigner who didn’t know any Chinese at all. We lived in the same apartment complex, and although neither of us knew the exact address, I at least knew how to get home. We caught a taxi on the street, and I had fun giving the driver directions in Chinese: turn left here, turn right there, go straight, etc.

Eventually I started extending my study times. I started studying for about an hour a day at least and I spent a lot of weekend nights drinking Baijiu (a Chinese wine) and studying and searching for other material to use and study and such.

After I finished the HelloChinese app, I felt a bit disappointed. Even though I had completed every lesson, I didn’t feel fluent at all. At that point, I only knew the basics. Overall, it felt like I still didn’t know anything, so I started experimenting with other methods of studying.

Besides talking with locals in daily life, I also chatted with people online using an app called iTalkie. Hanging out with locals was definitely easier, but I still needed something to study during my private time. That’s when I started using another app called ChineseSkill. It gave me more material to work with and helped fill the gaps I felt after finishing HelloChinese.

Although both apps were good, I found ChineseSkill to be a bit more challenging than HelloChinese. What surprised me most was how every app I tried offered something new and different. No matter which one I used, each had its own strengths, its own teaching style, and its own way of presenting the language. Eventually, I finished this app as well.

One thing I’ve learned over the years is that these apps never really “end.” They’re always updating, adding new lessons, new features, and new ways to practice. Even today, I still explore apps like these. They offer much more than simple lessons — they provide exercises, stories, dialogues, quizzes, and tools that keep the learning process fresh and interesting.

After finishing those apps, I eventually moved on to textbooks. The first one I used was Integrated Chinese. To be honest, I wasn’t very impressed. A lot of the material covered the same basics I had already learned from apps like HelloChinese and ChineseSkill. I can’t remember exactly how many books are in the series — maybe two or three — but I did go through all of them.

Around this time, I was still spending a lot of time with locals, but I also started using an app called HelloTalk. This app quickly became one of my best tools for finding Chinese people to talk with. I still use HelloTalk today. It’s obviously a great app and one of my favorites. I’ve been using it for years now, and I’ve made many friends through it — some of whom I even met in person.

During all of this time — whether for learning Chinese or simply out of general interest — I spent a lot of time watching Chinese movies and TV shows, and listening to Chinese music. I actually like Chinese music a lot. If you live in China, you’ll see they have plenty of apps for streaming, very similar to what we have here: their own versions of Netflix, Spotify, and more.

Watching and listening to Chinese content became a natural part of my daily life. It wasn’t just studying anymore; it was exposure. I heard real conversations, natural pronunciation. CCTV is great for catching authentic free Chinese TV. Perhaps I will make a list of TV and music apps in another blog post.

After I finished exploring Integrated Chinese, I moved on to another textbook called Developmental Chinese (《汉语发展》 Hànyǔ Fāzhǎn). This series is meant for learners who have reached an intermediate level. The characters in this book are not basic at all, and there’s no pinyin or reading assistance. If you want to study a book like this, you need to already feel comfortable reading basic characters on your own.

It was a very challenging textbook. I studied the first book in the series and eventually started the second one, but I dropped out halfway through. Recently, I decided to return to the first book to review and rebuild my foundation. So as I write this blog, Developmental Chinese is actually one of the textbooks I’m studying again.

Currently, I also use an app called Super Chinese. It is, without a doubt, better than HelloChinese and ChineseSkill. It’s a newer app that uses AI, and it feels modern, intuitive, and far more advanced than the older apps I used. In my opinion, it’s the best Chinese‑learning app available right now.

So that has been my journey. These days — in this era of “maxing,” looksmaxxing, skillmaxxing, and everything else — I guess you could say I’m China‑maxxing. I live a partially Chinese lifestyle: I go to Chinese restaurants all the time, I’m always watching Chinese movies and dramas, I listen to Chinese music, and I even cook authentic Chinese food at home.

Cooking has become one of my favorite study methods. I follow Chinese recipes, listen to the instructions, and read them in Chinese. For the dishes I’ve practiced, I’ve learned to understand the cooking steps clearly. I especially enjoy making Chinese medicinal meals — that has become my favorite part of cooking.

Even now, I still have a long way to go before reaching my language goals. But it has been a fun, meaningful, and life‑changing journey so far.

Thank you for reading.

ALL ABOUT FLEXBOX

display: flex — establishes the flex container (readies the flex box for future flexbox settings)

flex-direction: row — this is the default setting. a lot of times there is no need to set this. It aligns the elements horizontally along the x-axis

ALL flex-direction settings

flex basis–this has a higher specificity rating than width. It is like the new version of setting the width. When flex basis is used, the normal width setting is ignored. But it doesn’t ignore min-width and max-width values. When the focus is vertical instead of horizontal, it will deal with height. 

justify-content–this is used to define the alignment of flex items along the main axis of a flex container. The main axis can be either a row (horizontal) or a column(vertical), depending on the value of the flex-direction property.

align-self–used to align a specific flex item along the cross axis of its flex container, independently of the alignment defined by the align-items property on the flex container. 

All Align-Self Properties

align-content–is used to distribute space between and around flex lines when there is extra space along the cross-axis, which is the axis perpendicular to the main axis. This property is similar to align-items, but whereas align-items affects individual flex items on the cross-axis, align-content affects the space between and around multiple flex lines.

Align-Content Properties

  • It only applies when there is more than one line of flex items (i.e., when flex-wrap is set to wrap or wrap-reverse).
  • It controls the distribution of space in the cross-axis direction, which is the vertical direction in a row-direction flex container, and the horizontal direction in a column-direction flex container.

The align-content property can take several values:

  1. flex-start: Aligns the flex lines to the start of the flex container’s cross-axis.
  2. flex-end: Aligns the flex lines to the end of the flex container’s cross-axis.
  3. center: Centers the flex lines along the cross-axis.
  4. space-between: Distributes the flex lines evenly within the flex container along the cross-axis, such that there is a half-size space at the start and end of the flex container.
  5. space-around: Similar to space-between, but the spaces between the flex lines are equal, and there is also a half-size space on either end of the flex container.
  6. space-evenly: Distributes the flex lines so that the space between each line and the flex container edges is equal.
  7. stretch (default): If the flex lines don’t fill the flex container, this value stretches the lines to fill the remaining space along the cross-axis.

Flex-Grow Properties

flex-shrink–determines how a flex item should shrink relative to the rest of the flex items in the flex container when there isn’t enough space on the main axis to accommodate all flex items at their default or current size.

Flex-Shrink Properties

Default Value: The default value of flex-shrink is 1, which means that flex items will shrink if necessary to fit into the flex container.

Preventing Shrinking: A value of 0 for flex-shrink indicates that the flex item should not shrink, regardless of the available space in the flex container.

Shrinking Proportion: The flex-shrink value is a positive number without units, which acts as a multiplier for the amount of space the flex item will relinquish when the container is not large enough to hold all flex items at their current size.

Relative Shrinking: If all flex items have the same flex-shrink value, they will shrink equally. However, if the values differ, the item with the higher flex-shrink value will shrink more than others.

Shrink Rate: The actual rate at which a flex item shrinks is also influenced by its flex-basis property. The flex-basis property defines the initial size of the flex item before any shrinking occurs.

Usage: It’s often used in conjunction with flex-grow and flex-basis to control the layout of flex items within a flex container, ensuring that the items fit within the available space.

Order Properties

The order property accepts integer values (..., -3, -2, -1, 0, 1, 2, 3, …), where:

A larger value means the element will be ordered later (further to the right or bottom, depending on the flex direction).

A smaller value means the element will be ordered earlier (closer to the left or top).

A value of 0 means the element will use the default order, which is the order in which the elements appear in the source code.

flex-wrap–specifies how flex items should behave when the space in the flex container is insufficient to hold all flex items in a single line. It controls whether the items are forced into a single line or allowed to wrap onto multiple lines, and the direction in which the lines are stacked.

Flex-Wrap Properties

Flex-Basis In More Detail

flex-basis is a property that defines the initial main size of a flex item before free space is distributed according to the flex factors. It is one of the three main properties that control the layout of flex items, along with flex-grow and flex-shrink.

The shorthand flex property allows you to specify flex-grow, flex-shrink, and flex-basis in one declaration. For example:

.flex-item { flex: 1 1 10px; /* This means flex-grow: 1, flex-shrink: 1, flex-basis: 10px */ }

Some CSS Shorthand Properties

Flexbox shorthand properties are a way to simplify the syntax and reduce the amount of code you need to write.

Some good resources for flex-box reference

https://flexbox.io

CSS Flexbox Layout Guide | CSS-Tricks

Responsive Nightlife Event Email Template + Automated Lead Capture Flow

Today I Designed And Developed A Fully Responsive, CAN‑SPAM Compliant HTML Email Template For A VIP Nightlife & Event Promotion Brand, Built With MJML For Cross‑Email‑Client Compatibility. Integrated The Template Into Mailchimp (Free Tier) And Built An End‑To‑End Automated Lead Capture Workflow Using Google Forms And Zapier. 

This Is A Mock Project, By The Way. The Theme Of This Project Is As Follows:

A Chicago Nightlife / Events Company Wants People Who Fill Out A Google Form To Automatically Receive Your St. Patrick’s Party HTML Email As A Confirmation + Event Reminder.You Must Set Up The Email Template In ConvertKit, Then Connect It To Zapier So New Signups Get The Email Instantly.

I Am First Tasked With Completing The MJML Email Of Course.

This Code Then Needs To Be Uploaded To ConvertKit (In Today’s Example) I Used Mailchimp Instead. It Is Now A Reusable Template.

MJML code sample with mail chimp
mail chimp sample

During This Process I Also Tested The Email Using Tools Such As Testi.at And Made Sure The Email Looked Good In Various Platforms And Also On Desktop And Mobile. 

In The Next Step. I Set Up A Two Question Google Form:

After This, I Made A Zap In Zapier:

I Then Added Subscribers To The Form And Sent Out The Broadcast. I Had Seen The Email In My Inbox. 

To Summarize, The Executed Task Were As Follows:

Responsibilities & Technical Work:

  • Built mobile‑first responsive email layout using MJML, ensuring consistent rendering across Gmail, Outlook, Apple Mail, and mobile clients.
  • Exported clean, optimized HTML and implemented a legally compliant footer (physical address, unsubscribe link, social icons) to meet anti‑spam regulations.
  • Created a custom branded template in Mailchimp using the finalized HTML code.
  • Set up a contact list (audience) and imported subscriber data via CSV.
  • Designed a simple lead capture form with Google Forms to collect name and email.
  • Built a Zapier automation to auto-add new form respondents to the Mailchimp audience—creating a hands-free lead generation system.
  • Tested end-to-end flow: form submission → automation trigger → subscriber added → email ready to send.

Outcome:

A Production-Ready, Professional Email Marketing System That Reliably Captures Leads And Delivers Branded Event Announcements. Fully Scalable, Maintainable, And Representative Of Real-World Email Development And Marketing Automation Workflows.

Tools Used:

MJML, HTML, CSS, Mailchimp, Google Forms, Zapier, VS Code

EMAIL SUCCESS MODAL TUTORIAL

I did Frontend Mentor’s ‘Newsletter Sign-Up’ challenge. It’s a single-page form that checks your email and, when it’s valid, flips to a little ‘Thanks for subscribing!’ card. I wrote the layout in HTML, styled it with SCSS (so I could nest and organize the CSS faster), and used a few lines of vanilla JavaScript to stop the page reload, show any errors, and swap the views. It’s a good next-step project once you’re comfortable with the basics but not yet using frameworks. I want to explain how to do it as a tutorial here.

Tutorial: Building a Newsletter Sign-Up Form With a Success Message

This tutorial walks you through creating a newsletter sign-up form that validates the user’s email and shows a success message modal. We’ll cover:

  • Setting up the HTML structure (form + modal).
  • Styling everything with CSS/SCSS.
  • Adding JavaScript logic for validation and interactivity.

So, to begin, we’ll build this project in three stages:

  • HTML structure
  • CSS/SCSS styling
  • JavaScript interactivity

The HTML structure

The HTML has two main parts:

  • The newsletter form (what users see first).
  • The success modal (hidden at first, shown only when the email is valid).

First, create a file called index.html. This will hold the structure of our page. In index.html, type the HTML code that is below.

The HTML below will have two main sections:

  • .container → the newsletter form
  • .email-modal → the success popup (hidden at first)

Inside the form we have:

  • An email input (input type="email") so the browser knows to expect an email
  • A button to submit
  • A hidden error message (.invalidEmail) that we’ll show with JavaScript if the email is invalid

Here is the success modal, written at the start of the HTML just after the <body> tag:

<body>
   <!-- Success Message (hidden initially) -->
  <div class="email-modal">
    <div class="email-modal__container--content">
      <img src="assets/images/icon-success.svg" alt="success icon">
      <h1>Thanks for subscribing!</h1>
      <p>A confirmation email has been sent to <span class="user-email">ash@lorecompany.com</span>.</p>
      <button class="email-modal__close">Dismiss message</button>
    </div>
  </div>

Finish The Html And Add The Main Newsletter Form

<!-- Newsletter Form -->
  <div class="container">
    <div class="container__form--left">
      <h1>Stay Updated!</h1>
      <p>Join 60,000+ product managers receiving monthly updates on:</p>

      <!-- A few list items -->
      <ul>
        <li><img src="assets/images/icon-list.svg"> Product discovery and building what matters</li>
        <li><img src="assets/images/icon-list.svg"> Measuring to ensure updates are a success</li>
        <li><img src="assets/images/icon-list.svg"> And much more!</li>
      </ul>

      <!-- The sign-up form -->
      <form>
        <div class="form-header">
        <p>Email address</p>
        <p class="invalidEmail">Valid email required</p>
        </div>
        <input type="text" class="email-input" placeholder="email@company.com" required>
        <button type="submit" class="subscribe-button">Subscribe to monthly newsletter</button>
      </form>
    </div>

    <!-- Right side illustration -->
    <div class="container__form--right">
      <img src="assets/images/illustration-sign-up-desktop.svg">
    </div>
  </div>

  <script src="assets/js/app.js"></script>
</body>

Great ! We Are Done Writing The Html. You Should See All Of The Html(Including The Success Modal) Unstyled For Now. Here Are Some Key Points To Notice:

  • .email-modal is hidden by default with CSS (display: none).
  • .invalidEmail is the error message shown only when validation fails.
  • The form has an input for the email and a button to submit.

Now Let’s Do The Styling With SCSS

We’ll Use Variables, Nesting, And Partial-Like Organization.

Create A File Called Main.scss

Lets Do The Nesting In This File.

Let Us Create The Variables First:

// ----------------------------
// Variables
// ----------------------------
$DarkSlateGrey: hsl(234, 29%, 20%);
$CharcoalGrey: hsl(235, 18%, 26%);
$Grey: hsl(231, 7%, 60%);
$Tomato: hsl(4, 100%, 67%);
$White: hsl(0, 0%, 100%);

And Don’t Forget That We Always Need To Do A Css Reset:

// ----------------------------
// Reset
// ----------------------------
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

Let’s Do Some Universal Styling In The In The Body:

body {
  font-family: 'Roboto', sans-serif;
  background-color: $CharcoalGrey;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}



Now lets style the newsletter form

// ----------------------------
// Container Layout
// ----------------------------
.container {
  display: flex;
  background: $White;
  border-radius: 20px;
  overflow: hidden;
  width: 800px;
  max-width: 95%;

  &__form--left {
    flex: 1;
    padding: 2rem;

    h1 {
      font-size: 2rem;
      margin-bottom: 1rem;
      color: $DarkSlateGrey;
    }

    p {
      margin-bottom: 1rem;
      color: $DarkSlateGrey;
    }

    ul {
      margin-bottom: 2rem;

      li {
        display: flex;
        align-items: center;
        margin-bottom: 0.5rem;

        img {
          margin-right: 0.5rem;
        }
      }
    }

    form {
      display: flex;
      flex-direction: column;

      .form-header {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .invalidEmail {
          color: $Tomato;
          display: none;
          font-size: 0.8rem;
        }
      }

      .email-input {
        padding: 0.8rem;
        border: 1px solid $Grey;
        border-radius: 5px;
        margin-bottom: 1rem;

        &.error {
          border-color: $Tomato;
          background-color: lighten($Tomato, 40%);
        }
      }

      .subscribe-button {
        padding: 0.8rem;
        border: none;
        border-radius: 5px;
        background-color: $DarkSlateGrey;
        color: $White;
        font-weight: bold;
        cursor: pointer;

        &:hover {
          background-color: $Tomato;
        }
      }
    }
  }

  &__form--right {
    img {
      width: 100%;
      height: auto;
    }
  }
}

// ----------------------------
// Success Modal
// ----------------------------

.email-modal {
  display:none; //hidden by default
  background: $White;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;

  img {
    width: 50px;
    margin-bottom: 1rem;
  }

  h1 {
    margin-bottom: 1rem;
    color: $DarkSlateGrey;
  }

  p {
    color: $DarkSlateGrey;

    span {
      font-weight: bold;
    }
  }

  &__close {
    margin-top: 1rem;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    background-color: $DarkSlateGrey;
    color: $White;
    font-weight: bold;
    cursor: pointer;

    &:hover {
      background-color: $Tomato;
    }
  }
}

It Is Time To Make The Form Work !

Let’s Prepare The JavaScript.

Create A File Called App.js

Type This Code To Prepare To Manipulate The DOM:

document.addEventListener('DOMContentLoaded', function() {
  // your JS code here
});Code language: JavaScript (javascript)

What It Means

  • document → refers to the entire HTML document (the web page).
  • .addEventListener('DOMContentLoaded', …) → tells the browser:
    “Run this code only after the HTML has finished loading and is ready to be worked with.”
  • function() { … } → this is the callback (the code that will run once the event happens).

Here’s A Little Bit More About DOMContentLoaded And Why It Is Needed:

Imagine Your Script Tries To Grab Something Like:

const emailInput = document.querySelector('.email-input');
Code language: JavaScript (javascript)

If This Line Runs Before The Browser Has Loaded The HTML, Then .Email-Input Doesn’t Exist Yet → You’d Get Null.

Wrapping Your Code Inside DOMContentLoaded Ensures That All Elements Are Available In The DOM Before Your JS Starts Running.

When Does It Fire?

  • DOMContentLoaded fires as soon as the HTML is fully parsed (but before images, CSS, etc. finish loading).
  • This makes it faster than window.onload, which waits for everything (images, fonts, etc.) to load.

In Short It Is Just A Safety Wrapper That Says: “Don’t Run My JavaScript Until The HTML Document Is Ready.”

Let’s Select Some Important Elements From The Html:

document.addEventListener('DOMContentLoaded', function() {
  // Select important elements
    const form = document.querySelector('form');
    const emailInput = document.querySelector('.email-input');
    const invalidEmail = document.querySelector('.invalidEmail');
    const modal = document.querySelector('.email-modal');
    const userEmailSpan = document.querySelector('.user-email');
    const closeBtn = document.querySelector('.email-modal__close');
    const container = document.querySelector('.container');
});

I Can Explain Each Selection In Detail Here:

  1. const form = document.querySelector(‘form’);
    This grabs the first <form> element on the page.
    Now you can listen for things like form submissions.
  2. const emailInput = document.querySelector(‘.email-input’);
    This selects the <input> where the user types their email.
  3. const invalidEmail = document.querySelector(‘.invalidEmail’);
    This is the error message span/paragraph that shows up when the email is invalid.
  4. const modal = document.querySelector(‘.email-modal’);
    This points to the success modal (the popup after a valid submission).
  5. const userEmailSpan = document.querySelector(‘.user-email’);
    This is the span inside the modal where we display the user’s email.
  6. const closeBtn = document.querySelector(‘.email-modal__close’);
    This is the “Dismiss message” button in the modal.
  7. const container = document.querySelector(‘.container’);
    This is the main page content wrapper.

So Here Is The Big Picture:
This Whole Block Is Basically Collecting References To Important Elements In Your HTML So JavaScript Can “Talk To” Them Later:

  • Form → listen for submission
  • Email input → check what the user typed
  • Invalid email text → show/hide error
  • Modal → show/hide success message
  • User email span → inject user’s email
  • Close button → close the modal
  • Container → hide page content when modal is visible

Let’s Write The Email Validator Function Now:

document.addEventListener('DOMContentLoaded', function() {
  // Select important elements
    const form = document.querySelector('form');
    const emailInput = document.querySelector('.email-input');
    const invalidEmail = document.querySelector('.invalidEmail');
    const modal = document.querySelector('.email-modal');
    const userEmailSpan = document.querySelector('.user-email');
    const closeBtn = document.querySelector('.email-modal__close');
    const container = document.querySelector('.container');

 // Function to check if email is valid
    function emailValid(email) {
        return /\S+@\S+\.\S+/.test(email);
    }
});Code language: JavaScript (javascript)

Here Is What Is Happening:

Function EmailValid(Email) → Creates A Function Named EmailValid That Takes One Argument (Email = The Text The User Typed Into The Input Box).

Inside, It Uses A Regular Expression (Regex):

/\S+@\S+\.\S+/

And Then Runs .Test(Email) → Which Checks Whether The Given Email Matches That Regex Pattern.

  • If it matches → true
  • If it doesn’t → false

What Does The Regex /\S+@\S+\.\S+/ Mean?

  • / ... / → regex pattern
  • \S+ → one or more non-whitespace characters (so no spaces allowed)
  • @ → must contain an at symbol
  • \S+ → more non-whitespace characters after the @
  • \. → a literal dot (the \ escapes it so it’s treated as a dot, not “any character”)
  • \S+ → one or more non-whitespace characters after the dot

So, In Plain English: “This String Must Have Some Text, Then An @, Then More Text, Then A ., Then More Text — All Without Spaces.”

Now Let’s Write The Code That Is The Glue Between The User’s Action (Submitting The Form) And All The JavaScript Logic We Wrote.

Add The Eventlistener Below To App.js Now.

form.addEventListener('submit', (e) => {
  // your code runs here when the form is submitted
});

Code language: PHP (php)

Let Me Explain This Part Of The Code.

We Previously Grabbed The Form With:

const form = document.querySelector('form');
Code language: JavaScript (javascript)

Now We’re Saying: “Hey Form, Whenever Someone Submits You (By Pressing Enter Or Clicking The Submit Button), Run This Function.”

The (E) => { … }

  • (e) → this is the event object, automatically passed in. It holds info about what happened (like which element triggered the event, if Ctrl was pressed, etc.).
  • Commonly, we call e.preventDefault(); inside — which stops the browser from doing its default action (reloading the page when a form submits). Let’s do that now. 

Add This Code Inside Of The Function, Like So:

/ Handle form submit
    form.addEventListener('submit', (e) => {
        e.preventDefault(); // Prevent form from submitting; stop page refresh

        
    });Code language: PHP (php)

Now Let’s Write The Heart Of The Form Logic. The Code Below Decides:

  •  What happens when the email is valid
  •  What happens when the email is invalid

Add This Block Of Code To The Function:

if (emailValid(emailInput.value)) {
    // Hide error 
    invalidEmail.style.display = 'none';

    // Show modal
    modal.style.display = 'block';
    container.style.display = 'none';

    // Insert user's email into modal
    userEmailSpan.textContent = emailInput.value;

} else {
    // Show error
    invalidEmail.style.display = 'block';
    emailInput.style.borderColor = 'hsl(4, 100%, 67%)';
    emailInput.style.backgroundColor = '#ffe8e6';
}
Code language: JavaScript (javascript)

Let Me Explain:

if (emailValid(emailInput.value))Code language: CSS (css)
  • emailInput.value → whatever the user typed in the email box.
  • emailValid(...) → our helper function using regex (/\S+@\S+\.\S+/) to check if it looks like an email.

In A Nutshell This Line Of Code Is Saying: “If The User’s Email Looks Valid, Run The Success Case. Otherwise, Run The Error Case.”

Now Let’s Look At The Success Case

invalidEmail.style.display = 'none';

  • Hides the red error message (“Valid email required”).
modal.style.display = 'block';
container.style.display = 'none';
Code language: JavaScript (javascript)
  • Hides the form (.container)
  • Shows the success message modal (.email-modal).
userEmailSpan.textContent = emailInput.value;
  • Inserts the user’s actual email into the modal text.
  • So instead of a generic message, they see:
  • “A confirmation email has been sent to youremail@example.com”
invalidEmail.style.display = 'block';
  • Shows the red error text under the input (“Valid email required”).
emailInput.style.borderColor = 'hsl(4, 100%, 67%)';
emailInput.style.backgroundColor = '#ffe8e6';
Code language: JavaScript (javascript)
  • Visually highlights the input box with a red border and light red background.
  • This is a common error feedback pattern: “You typed something wrong, fix it.”

In Plain English, The Code Above Means:


When The User Clicks Subscribe: 

If The Email Looks Valid: Hide The Error, Show The Success Modal, And Display Their Email Inside It. If The Email Is Invalid: Show The Error Message + Style The Input Box Red So The User Knows Where The Problem Is.

Finally, Put This Code Into App.js:

// Handle close modal
    closeBtn.addEventListener('click', () => {
        modal.style.display = 'none';
        container.style.display = 'flex';
        emailInput.value = '';
        emailInput.style.borderColor = 'hsl(231, 7%, 60%)';
        emailInput.style.backgroundColor = 'white';
    });

This Block Of Code Is All About Resetting The UI When The User Closes The Success Message Modal. Let Me Break It Done For You.

closeBtn.addEventListener('click', …)Code language: JavaScript (javascript)
  • closeBtn = the “Dismiss message” button inside the modal.
  • When the user clicks it → run this arrow function.
modal.style.display = 'none';
  • hides the modal
  • → The success message (.email-modal) disappears.
container.style.display = 'flex';
  • shows the form again
  • → The main sign-up form (.container) comes back, so the user can subscribe again (or with a different email).
emailInput.value = '';
Code language: JavaScript (javascript)
  • this clears the input box
  • → The email field is emptied out.
  • This makes it feel like a “fresh form” instead of keeping the old email.
emailInput.style.borderColor = 'hsl(231, 7%, 60%)';
emailInput.style.backgroundColor = 'white';
Code language: JavaScript (javascript)
  • This resets the input styles
  • → Removes the error highlight (if there was one).
  • → Returns the input box to its default neutral look.

So Just To Give A Summary:

When The User Dismisses The Success Message:

  • Hide the modal
  • Show the form again
  • Reset the email field and its styling

Basically, This Button Resets The App Back To Its Starting State So The User Can Try Again If They Want.

That’s It. This Is Our Newsletter Sign-Up Form. All Of The Code Can Be Seen Below:

THE HTML:

<body>
   <!-- Success Message (hidden initially) -->
  <div class="email-modal">
    <div class="email-modal__container--content">
      <img src="assets/images/icon-success.svg" alt="success icon">
      <h1>Thanks for subscribing!</h1>
      <p>A confirmation email has been sent to <span class="user-email">ash@lorecompany.com</span>.</p>
      <button class="email-modal__close">Dismiss message</button>
    </div>
  </div>
  <!-- Newsletter Form -->
  <div class="container">
    <div class="container__form--left">
      <h1>Stay Updated!</h1>
      <p>Join 60,000+ product managers receiving monthly updates on:</p>

      <!-- A few list items -->
      <ul>
        <li><img src="assets/images/icon-list.svg"> Product discovery and building what matters</li>
        <li><img src="assets/images/icon-list.svg"> Measuring to ensure updates are a success</li>
        <li><img src="assets/images/icon-list.svg"> And much more!</li>
      </ul>

      <!-- The sign-up form -->
      <form>
        <div class="form-header">
        <p>Email address</p>
        <p class="invalidEmail">Valid email required</p>
        </div>
        <input type="text" class="email-input" placeholder="email@company.com" required>
        <button type="submit" class="subscribe-button">Subscribe to monthly newsletter</button>
      </form>
    </div>

    <!-- Right side illustration -->
    <div class="container__form--right">
      <img src="assets/images/illustration-sign-up-desktop.svg">
    </div>
  </div>

  <script src="assets/js/app.js"></script>
</body>Code language: HTML, XML (xml)

THE SCSS:

// ----------------------------
// Variables
// ----------------------------
$DarkSlateGrey: hsl(234, 29%, 20%);
$CharcoalGrey: hsl(235, 18%, 26%);
$Grey: hsl(231, 7%, 60%);
$Tomato: hsl(4, 100%, 67%);
$White: hsl(0, 0%, 100%);

// ----------------------------
// Reset
// ----------------------------
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: $CharcoalGrey;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

// ----------------------------
// Container Layout
// ----------------------------
.container {
  display: flex;
  background: $White;
  border-radius: 20px;
  overflow: hidden;
  width: 800px;
  max-width: 95%;

  &__form--left {
    flex: 1;
    padding: 2rem;

    h1 {
      font-size: 2rem;
      margin-bottom: 1rem;
      color: $DarkSlateGrey;
    }

    p {
      margin-bottom: 1rem;
      color: $DarkSlateGrey;
    }

    ul {
      margin-bottom: 2rem;

      li {
        display: flex;
        align-items: center;
        margin-bottom: 0.5rem;

        img {
          margin-right: 0.5rem;
        }
      }
    }

    form {
      display: flex;
      flex-direction: column;

      .form-header {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .invalidEmail {
          color: $Tomato;
          display: none;
          font-size: 0.8rem;
        }
      }

      .email-input {
        padding: 0.8rem;
        border: 1px solid $Grey;
        border-radius: 5px;
        margin-bottom: 1rem;

        &.error {
          border-color: $Tomato;
          background-color: lighten($Tomato, 40%);
        }
      }

      .subscribe-button {
        padding: 0.8rem;
        border: none;
        border-radius: 5px;
        background-color: $DarkSlateGrey;
        color: $White;
        font-weight: bold;
        cursor: pointer;

        &:hover {
          background-color: $Tomato;
        }
      }
    }
  }

  &__form--right {
    img {
      width: 100%;
      height: auto;
    }
  }
}

// ----------------------------
// Success Modal
// ----------------------------

.email-modal {
  display:none; //hidden by default
  background: $White;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;

  img {
    width: 50px;
    margin-bottom: 1rem;
  }

  h1 {
    margin-bottom: 1rem;
    color: $DarkSlateGrey;
  }

  p {
    color: $DarkSlateGrey;

    span {
      font-weight: bold;
    }
  }

  &__close {
    margin-top: 1rem;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    background-color: $DarkSlateGrey;
    color: $White;
    font-weight: bold;
    cursor: pointer;

    &:hover {
      background-color: $Tomato;
    }
  }
}


Code language: PHP (php)

THE JAVASCRIPT:

document.addEventListener('DOMContentLoaded', function() {
    // Select important elements
    const form = document.querySelector('form');
    const emailInput = document.querySelector('.email-input');
    const invalidEmail = document.querySelector('.invalidEmail');
    const modal = document.querySelector('.email-modal');
    const userEmailSpan = document.querySelector('.user-email');
    const closeBtn = document.querySelector('.email-modal__close');
    const container = document.querySelector('.container');

    // Function to check if email is valid
    function emailValid(email) {
        return /\S+@\S+\.\S+/.test(email);
    }

    // Handle form submit
    form.addEventListener('submit', (e) => {
        e.preventDefault(); // Prevent form from submitting; stop page refresh

        if (emailValid(emailInput.value)) {
            //Hide error 
            invalidEmail.style.display = 'none';

            // Show modal
            modal.style.display = 'block';
            container.style.display = 'none';

            // Insert user's email into modal
            userEmailSpan.textContent = emailInput.value;

        } else {
            // Show error
            invalidEmail.style.display = 'block';
            emailInput.style.borderColor = 'hsl(4, 100%, 67%)';
            emailInput.style.backgroundColor = '#ffe8e6';
        }
    });

    // Handle close modal
    closeBtn.addEventListener('click', () => {
        modal.style.display = 'none';
        container.style.display = 'flex';
        emailInput.value = '';
        emailInput.style.borderColor = 'hsl(231, 7%, 60%)';
        emailInput.style.backgroundColor = 'white';
    });

});Code language: JavaScript (javascript)

Lastly. I Forgot To Mention That We Need To Make The Form Responsive. Put The Following Code Into The Bottom Of Main.scss:

/***THE MEDIA QUERIES***/

  @media only screen and (max-width: 1440px) {
    .container {
      display: flex;
      margin-top: 1.333rem;
      width: 60%;
      background-color: white;
      border-radius: 30px;
    }
  
  
    .container__form--right {
      width: 50%;
    }
  
    .container__form--left {
      padding: 2rem;
      font-weight: 400;
      color: var(--CharcoalGrey);
      width: 50%;
      padding: 2rem;
    }
  
    .container__form--left--header {
      h1 {
        font-size: 3.6rem;
        font-weight: 700;
        color: var(--DarkSlateGrey);
        margin-bottom: 1.5rem;
        font-weight: 700;
      }
  
      p {
        margin-bottom: 1.5rem;
      }
    }
  
    .container__form--left--list {
      margin-bottom: 2rem;
      li {
        display: flex;
        margin-bottom: 1rem;
  
        p {
          margin-left: 1rem;
        }
      }
    }
  
    .container__form--left--form {
  
      p {
        color: var(--CharcoalGrey);
        font-weight: 700;
        margin-bottom: 0.5rem;
      }
      form {
        display: flex;
        flex-direction: column;
  
        label {
          font-weight: 700;
          margin-bottom: 0.5rem;
        }
  
        input {
          border: 1px solid var(--Grey);
          border-radius: 5px;
          padding: 0.9rem;
          margin-bottom: 1.5rem;
          width: 100%;
        }
  
        button {
          border-radius: 5px;
          padding: 0.9rem;
          background-color: var(--DarkSlateGrey);
          font-weight: 700;
          color: white;
          border: none;
          cursor: pointer;
          width: 100%;
        }
      }
    }
    .container__form--right {
      padding: 1rem;
      img {
        width: 100%;
      }
    }

  }

  @media only screen and (max-width: 1416px) {
	
    .container {
      display: flex;
      margin-top: 1.333rem;
      width: 60%;
      background-color: white;
      border-radius: 30px;
    }
  
  
    .container__form--right {
      width: 50%;
    }
  
    .container__form--left {
      padding: 2rem;
      font-weight: 400;
      color: var(--CharcoalGrey);
      width: 50%;
      padding: 2rem;
    }
  
    .container__form--left--header {
      h1 {
        font-size: 2.9rem;
        font-weight: 700;
        color: var(--DarkSlateGrey);
        margin-bottom: 1.5rem;
      }
  
      p {
        margin-bottom: 1.5rem;
        font-size: 0.84rem;
      }
    }
  
    .container__form--left--list {
      margin-bottom: 2rem;
      li {
        display: flex;
        margin-bottom: 1rem;
  
        p {
          margin-left: 1rem;
          font-size: 0.83rem;
        }
      }
    }
  
    .container__form--left--form {
  
      p {
        color: var(--CharcoalGrey);
        font-weight: 700;
        margin-bottom: 0.5rem;
      }
      form {
        display: flex;
        flex-direction: column;
  
        label {
          font-weight: 700;
          margin-bottom: 0.5rem;
        }
  
        input {
          border: 1px solid var(--Grey);
          border-radius: 5px;
          padding: 0.9rem;
          margin-bottom: 1.5rem;
          width: 100%;
        }
  
        button {
          border-radius: 5px;
          padding: 0.9rem;
          background-color: var(--DarkSlateGrey);
          font-weight: 700;
          color: white;
          border: none;
          cursor: pointer;
          width: 100%;
        }
      }
    }
    .container__form--right {
      padding: 1rem;
      img {
        width: 100%;
      }
    }
  
  }
  
  /******TABLET******/
  @media only screen and (max-width: 1023px) {
    body {
      background-color: white;
      display: flex;
    
    }

    .container {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin-top: 1.333rem;
      width: 100%;
      background-color: white;
      border-radius: 30px;

      .logoimg {
        width: 100%;
        padding: 0;
        margin-top: -1.3rem;
        display: flex;
      }
    }
	
    .container__form--right {
      width: 100%;
    }
  
    .container__form--left {
      padding: 2rem;
      font-weight: 400;
      color: var(--CharcoalGrey);
      width: 100%;
      padding: 2rem;
    }

    .container__form--right {
      padding: 0;
     img {
      display: none;
     }
  }
	
  
  }
  
  
  
  /******MOBILE******/
  @media only screen and (max-width: 768px) {

    body {
      background-color: white;
      display: flex;
    
    }

    .container {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin-top: 1.333rem;
      width: 100%;
      background-color: white;
      border-radius: 30px;

      .logoimg {
        width: 100%;
        padding: 0;
        margin-top: -1.3rem;
        display: flex;
      }
    }
	
    .container__form--right {
      width: 100%;
    }
  
    .container__form--left {
      padding: 2rem;
      font-weight: 400;
      color: var(--CharcoalGrey);
      width: 100%;
      padding: 2rem;
    }

    .container__form--right {
      padding: 0;
     img {
      display: none;
     }
  }

  .email-modal__close {
    margin-top: 10rem;
  }
}Code language: PHP (php)

This Is The Page On Desktop:

This Is The Tablet Version:

And This Is The Mobile Version:

Thank You For Tuning In.