fbpx
Home Blog Page 894

How earning a Google UX design credential is transforming Olivia’s web-design career

0
How earning a Google UX design credential is transforming Olivia’s web-design career

Meet Olivia, a Richmond, Virginia-based web designer with over six years of professional experience in the creative industry. Read more about Olivia and how she uses UX design to show off her creative skills for her clients.

I have successfully completed three courses: Foundations of User Experience (UX) Design, Start the UX Design Process: Empathize, Define, and Ideate, and Build Wireframes and Low-Fidelity Prototypes. However, I am not stopping there; I am determined to continue my learning journey.

In my role as a web designer for a collegiate marketing company, I have honed my empathetic skills by creating personas, user stories, user journey maps, and problem statements. These skills have helped me prioritize the user’s needs and preferences, resulting in designs that are user-friendly and accessible to all.

Additionally, my ideation skills have strengthened, particularly through conducting competitive audits and engaging in creative exercises like “Crazy 8’s.” These practices have encouraged me to think innovatively and observe successful and unsuccessful strategies employed by other businesses in the industry.

Moreover, I have gained proficiency in wireframing and prototyping by using tools like Figma, which allows me to create low-fidelity versions of products and present early phases of my work interactively to stakeholders and clients. It was a great experience to compare Figma to other tools we use for prototyping at my job.

As I progress toward obtaining a Google certification in UX design, I still have four more courses to complete out of the total seven, and I am eagerly looking forward to achieving this milestone.

To those embarking on their learning journey, please take your time and not rush through the courses. It’s essential to let the information sink in and grasp the concepts thoroughly before moving forward. Remember, learning should be enjoyable, so have fun with it! And don’t forget that Google’s certification program allows you to reset deadlines and learn at a comfortable pace.

Practice These Database Administrator Interview Questions to Help You Prepare for Your Next Interview 

0
Practice These Database Administrator Interview Questions to Help You Prepare for Your Next Interview 

Are you in interview prep mode? Whether you’re looking for database administrator interview questions to use in a mock interview, or simply looking for review questions to reinforce what you’re learning, you’ve come to the right place.  

Reviewing commonly asked interview questions and practicing answering them out loud is one of the best ways to prepare for an interview, especially a technical interview when you could be asked a wide range of questions to test your relevant skills and knowledge. To help you get ready for your interview, we put together a list of 15 of the top questions that are asked during Database Administrator interviews.

Learn something new for free

1. What type of databases do you have experience with? 

You probably covered this on your resume, but the interviewer will likely want to talk through this early in your interview. It’s a great opener because it allows you to discuss your skills as they relate to the position you’re interviewing for and any projects you’ve worked on in other jobs or freelance work. 

When you’re narrowing down which databases to discuss, you could look back at the job description to find the ones that are most relevant to this job. Prioritize talking about the ones listed on the job description, and then, talk about others you have experience with as well. 

2. Do you have experience working with on-premises databases, cloud databases, or both? 

Some companies still use on-premises databases, so your interviewer will want to hear more about your experience with this if you’ve worked with on-premises databases. Others have switched entirely to the cloud, while some are transitioning. But having experience with both types could be valuable to your future employer if they’ll be making that transition and are looking for help with it. Explain how long you’ve worked with each type of database and what tasks you performed. 

3. What is ODBC? 

Open database connectivity (ODBC) is an API that unifies access to multiple SQL databases. It’s interoperable, meaning it enables a single application to communicate with different DSNs and return results. 

4. What is the highest number of database servers you have experience working with? 

This is an important question because hiring managers expect you to be able to work with a specific number of databases. The number of databases will be relative to the size of the database you manage. 

When answering the question, mention the number of databases you’re capable of working with at one time, along with their size. This is crucial because, for example, if you have worked with five at a time, but you fail to mention they were 1 TB, you’ll give the interviewer an inaccurate idea of your skills and experience. 

5. How do you handle the loss of data during a database migration? 

The interviewer will ask you this question to assess how you would handle a database migration and what you would do if any problems occurred. Since data migrations present challenges and there’s always a risk data will become lost or corrupted, this is an important topic to cover. 

You should talk through the precautions you take before the migration to help prevent problems, specifically putting proper failover and recovery processes in place. 

Also, you can mention how migrating data in smaller increments rather than on large migration is the best way to minimize data loss. You also need a system for validating the migrated data. This allows errors to be detected and managed faster before continuing the migration process. While it won’t eliminate loss, it will significantly lower the risk. 

6. What are some common concerns with database management? 

A common concern for database managers is data safety. This is because one of the top priorities is to ensure there’s no loss or corruption of data during migration or during general use. 

Security is another common concern. Whether the breach is caused by employee negligence or hackers, data leaks can be detrimental to a business’s reputation and survival. It’s crucial to take preventative measures and have plans to deal with these types of issues. 

7. Why use an SQL agent? 

A SQL agent performs the job scheduling function. You can set jobs to run at a specific time or when a particular event occurs. 

In most cases, SQL agents are used to schedule repetitive administrative jobs. One example of this is a daily database backup. 

8. Would you run a test on a live database? Why or why not? 

The correct answer to this question is no. That’s because running tests in a live production environment can lead to data corruption or a system crash, causing the server to become unstable. This can lead to a very pricy fix, resulting in a significant financial loss for a company. 

Rather than running tests live, it’s better to run them in a staging environment, which should happen before pushing anything out to the live database. 

9. What is a database? 

This question may sound obvious, but answering it tells the interviewer you understand the nature of databases and what they do. A database is a collection of organized, structured data or tables. This data is controlled by a database management system and can be navigated using a common language such as SQL. 

Learn more about the different types of databases. 

10. How would you improve our data backup process? 

You can speed up the backup process by performing backups when fewer people are accessing the database. Also, consider backing up the database to multiple files instead of one large one. This significantly reduces the completion time of a backup. Incremental backups can also reduce backup time. 

Keep in mind that companies are always looking for ways to save money and optimize time, and shortening the backup process while maintaining efficiency is important to business owners. 

11. What is Hadoop? 

Hadoop is an open-source software library for storing and processing vast datasets across clusters of servers. It does this efficiently using distributed storage and parallel processing to manage big data better. 

12. What is a flat file? 

A flat file is a plain text file that doesn’t take up much space. It’s sometimes referred to as a text database and can be saved as a comma-separated value (CSV) file or a delimited flat file. Because they don’t take up much space, they work well for transferring data. Many applications require flat files when importing data. 

13. What types of relationships exist in a database? 

Databases contain four types of relationships: one-to-one, one-to-many, many-to-one, and many-to-many. These are associations between tables created to join statements that retrieve data. There can be only one record on each side of the relationship for both tables. Each of the primary key values relates to only one record or no records in the table related to it. 

14. What are some advantages of using SQL? 

SQL has several advantages, which is why it’s so widely used. It eliminates the need for coding, making databases easier and simpler to manage, which results in faster query processing. SQL is considered easy to learn and is a standard language supported by most database management systems. 

15. What is the difference between SQL and No SQL? 

Standard query language (SQL) is used in relational databases. These are vertically scalable and use predefined schema. 

Use NoSQL in distributed or non-relational databases. These databases are horizontally scalable and use dynamic schemas for unstructured data. Though SQL is more versatile, it’s also more restrictive. 

Read more on the differences between SQL and NoSQL databases. 

Looking for more interview support? 

How’d you do? Need a refresher on any of these topics? Our Design Databases with PostgreSQL covers how to create a database from scratch and optimize a database. You’ll also learn best practices for database design. And our Learn SQL course is a great place to start if you need to brush up on SQL.  

For extra interview resources, check out our guide to the technical interview, and be sure to read our tips for answering behavioral interview questions. You can also visit our Career Center for more job-hunting support. 

If you’re looking for ways to break into this industry, check out our tips on how to land a Database Administrator role, and if you’re new to the field, you can read up on what a Database Administrator does.  

Looking for additional classes to take to add to your skillset? Check out our full catalog of courses.

Top 15 Shell Scripting Interview Questions (Plus Answers) to Help You Ace Your Next Interview 

0
Top 15 Shell Scripting Interview Questions (Plus Answers) to Help You Ace Your Next Interview 

Knowledge of shell scripting is required in many technical jobs, including roles in DevOps, network engineering, cybersecurity, software engineering, and systems administration. And when you’re applying for a job that’ll use shell scripting, you could very well be asked shell scripting questions during your technical interviews. One of the best ways to prepare for these questions is to practice answering them in a mock interview.  

You can ask a friend or family member to play the role of the interviewer and ask you questions that might come up during your interview. This allows you to practice answering questions out loud in front of another person. If you’re interviewing remotely, consider doing your mock interview remotely as well. This way you’ll practice in an environment that’s similar to how your real interview will be conducted. And you can always practice answering questions out loud on your own if someone isn’t available for your mock interview.   

To help you prepare, here are 15 shell scripting interview questions you might be asked in a technical interview. 

Learn something new for free

1. What is a shell? 

A shell is a command-line interpreter between either a user or an application and the operating system’s kernel. The kernel manages and controls access to the computer’s resources and hardware. The shell is a layer on top of the kernel that communicates with the kernel to send commands to the hardware. 

2. What is a shell script? 

A shell script is simply a series of shell commands in a plain text file executed sequentially to accomplish a task. Shell scripts allow users to store these commands so they can be run again. 

3. What are some popular types of shells? 

  • Bourne Shell (sh): the original UNIX shell and the default for Solaris OS. 
  • C Shell (csh): a shell program that uses C syntax. 
  • Korn Shell (ksh): a Unix-based, high-level shell program. 
  • Bourne Again Shell (bash): an open-source shell program found on all Linux-based systems. 

4. What is a shebang in a shell script? 

A shebang is a hash sign (#) followed by an exclamation point (!) and a string that represents the location of the program that will execute it. For example, the following shebang means the script should be run with Bourne Again Shell: 

#!/bin/bash  

By adding a shebang, you can execute a shell script by calling the file without adding the location of the shell to the command. 

5. How do you pass and access arguments in a shell script? 

You can pass arguments to a shell script to the script by listing them after the name of the script, like this: 

./my_script.sh arg1 arg2  

Then you can access them in the script with a dollar sign and a number that indicates the argument’s location, like this: 

$1 # =arg1 $2 # =arg2  

6. What does $# do in a shell script? 

This is a global variable in a shell script that gives you the count of the arguments passed to it. 

7. How do you print to the terminal in a shell script? 

You can print to the command line using echo.  

echo "this will print"  

You can also use tput, which gives you options to change the color of the text and add other text effects to the output. 

8. How do you define a variable in a shell script? 

To define a variable in a shell script, you use the equal sign, and to access the variable, you add a dollar sign to the name you gave the variable. It looks like this: 

var = "my_variable" echo $var # prints my_variable  

9. How do you print the output of a shell script to a file? 

You use a greater than sign (>) and the output file in your command after the script file name, like this: 

./myscript.sh > outputfile.txt  

10. What command will display the contents of a file? 

The cat command will output the contents of a file. The following command reads one file and then uses the greater than sign to print the results to another file. 

cat text1.txt > text2.txt  

11. What does a dot (.) mean at the beginning of a file, and how would you list that file? 

The dot indicates that the file is hidden. Using the standard ls command to list the files in a directory won’t list hidden files. To show them in the list, you have to add the -a option to the command, like this: 

ls -a ./mydirectory  

12. What types of loops can you use in a shell script? 

The three types of loops you can use in a shell script are For, While, and Until. The For Loop loops through a list of items. The While Loop executes a loop while a condition returns true and exits once it’s false. The Until Loop executes a loop while a condition is false and exits once it is true. 

13. What is a break statement used for? 

A break statement is used to exit a loop. It’s usually used with an if statement to check a condition when the loop should be exited early. 

14. How do you determine which shell you’re currently using? 

You can do this by echoing the $SHELL variable, with this command: 

echo $SHELL # prints /bin/bash  

15. How do you determine which types of shells you have available on your system? 

You can do this with the following command: 

cat /etc/shells  

This will output a list of shells like the following: 

/bin/sh /bin/bash /bin/csh /bin/ksh  

More shell scripting interview help 

If you need a refresher, our beginner-friendly Learn the Command Line course covers the ins and outs of using the text-based interface of your computer so you can use it with increased speed and efficiency. If you already know the command line well, then our Learn Bash Scripting course will teach you shell scripting using Bourne Again Shell, one of the most popular versions of shell. 

For more interview prep, read our guide on how to ace your technical interview, advice for the whiteboard interview, and tips on answering behavioral interview questions. If you are doing a virtual interview, check out our Zoom interview tips.  

Our Career Center offers more job-hunting resources, from resume-writing tips to networking advice. And if you’re interested in learning a new skill, you can check out all the courses we offer in our course catalog.

Weekly Student News Quiz: Canada, Fortnite, ChatGPT

0
Weekly Student News Quiz: Canada, Fortnite, ChatGPT

Above is an image related to one of the news stories we followed recently. Do you know what it shows? You’ll find the answer at the bottom of this quiz.

But first, here are 10 questions about the events of the past week. How many can you answer correctly?

Do We Need Better Music Education?

0
Do We Need Better Music Education?

Do you play any musical instrument — or have you ever? Do you think music should be an essential part of every child’s education?

In “We’re Teaching Music to Kids All Wrong,” Sammy Miller, a Grammy-nominated drummer and the founder of a music education company, writes:

Each fall, as school starts up again, music educators witness a familiar ritual: Eager first-time students squeak on a clarinet, suppress giggles at the noises coming from the tubas and zealously hit a bass drum a little too hard. It’s a moment characterized by excitement, enthusiasm and the anticipation of new beginnings — which is why it’s so disheartening to know that many of those kids will eventually quit their instruments.

The fact that many children don’t stick with music is bad news not only for the state of self-expression and joy but also for education. Studies show that students who play an instrument do better in science, English and math and are more likely to want to attend college. They also may have less anxiety and be more conscientious — they are the kids you want your kids to be friends with. I have never met an adult who is expressly thankful to have quit music as a child, but I’ve met many who have regrets. So why haven’t we, as parents and educators, been better able to encourage our own kids to continue?

In my 15 years as a musical educator, talking to countless teachers, I’ve learned one thing: There is no magical fix. Making music education more successful doesn’t need to involve expensive digital accessories or fancy educational platforms (and I say that as someone who developed an online educational platform). There’s no technological or financial program that will convert children into lifelong music lovers.

Instead, we need to start by rethinking how we teach music from the ground up, both at home and in the classroom. The onus is on parents and educators to raise the next generation of lifelong musicians — not just for music’s sake, but to build richer, more vibrant inner personal lives for our children and a more beautiful and expressive world.

Mr. Miller urges parents and educators to take a new approach to musical education:

It’s often been repeated that “music is a language,” yet we’re reluctant to teach it that way. When we learn a language, we don’t simply memorize phrases or spend all day reading — we practice the language together, sharing, speaking, stumbling but ultimately finding ways to connect. This should happen in music class, too. Music should be a common pursuit: Ask any dad rock weekend band or church ensemble how it experiences music, and the performers are likely to tell you it’s not a chore but a way of building community.

Most important, we need to let kids be terrible. In fact, we should encourage it. They’ll be plenty terrible on their own — at first. But too often kids associate music in school with a difficult undertaking they can’t hope to master, which leads them to give up. Music does not have to be, and in fact, shouldn’t be, about the pursuit of perfection. And the great musicians have plenty of lessons to teach students about the usefulness of failure.

Students, read the entire article and then tell us:

  • Do you play any musical instruments? If so, how did you learn? What role does music play in your life?

  • Mr. Miller writes that after great “excitement, enthusiasm and the anticipation,” many children eventually quit their instruments. What kind of musical education, in or out of school, have you had? How effective has it been?

  • If you are one of the many people described by Mr. Miller who have started an instrument but later quit, why did you give up? Do you think a different approach to musical education, like the kind described in the essay, might have helped you to stick with it?

  • While saying there is no “magical fix” for converting children into lifelong music lovers, Mr. Miller shares several recommendations for improving musical education, such as, letting kids to be terrible and make a lot of mistakes or encouraging students to write their own simple songs using a few chords. What do you think of his proposed approach? What other suggestions would you give to parents and educators who hope to spark a love of music in young people?

  • Mr. Miller writes that studies show that students who play an instrument do better in science, English and math, and may have less anxiety and be more conscientious. What benefits of music education have you seen or experienced? Do any of these benefits, or others not mentioned in the essay, come to mind when you think of the value of learning music?

  • Does reading Mr. Miller’s essay make you more excited about playing music? Why or why not? If you could learn to play any instrument (or one different from what you already play), what would it be? Why?


Students 13 and older in the United States and Britain, and 16 and older elsewhere, are invited to comment. All comments are moderated by the Learning Network staff, but please keep in mind that once your comment is accepted, it will be made public and may appear in print.

Find more Student Opinion questions here. Teachers, check out this guide to learn how you can incorporate these prompts into your classroom.

Ancient Arrow

0
Ancient Arrow

A recent Times article reports:

Espen Finstad was trudging through mud in the Jotunheimen mountains of eastern Norway this month when he happened upon a wooden arrow, bound with a pointed tip made of quartzite. Complete with feathers, it was so well-preserved that it looked as if it could have been lost just recently.

But Mr. Finstad, a glacial archaeologist for the county of Innlandet, knew better. By his estimate, the arrow is probably about 3,000 years old.

The find is among thousands of artifacts and remains that have emerged from melting ice in recent years, as climate change thaws permafrost and glaciers around the world.

Based on its age and where it was found, what do you think this arrow could have been used for? Who might it have belonged to? How did it end up lost to the ice? Write the opening of a short story or poem that tells the tale of this ancient arrow.

Post it in the comments, then read the related article to find out more.


Students 13 and older in the United States and Britain, and 16 and older elsewhere, are invited to comment. All comments are moderated by the Learning Network staff, but please keep in mind that once your comment is accepted, it will be made public and may appear in print.

Find more Picture Prompts here.

Word of the Day: opulent

0
Word of the Day: opulent

The word opulent has appeared in 124 articles on NYTimes.com in the past year, including on April 27 in “A Glamorous Masked Ball, and 100 People to Know” by Katie Van Syckle:

The Met Gala, which will be held next week, serves as the unofficial birthday party for Vogue magazine. The outfits at Time’s 100 Most Influential People in the World gala, held last night at Jazz at Lincoln Center, generally don’t involve as much forethought, but it is nevertheless an opulent affair. Many of the people on the list attended, and the sparkles were plentiful this year.

Jennifer Coolidge, who hosted the event, was decked out in a black, beaded Balmain dress. She mingled with Steven Spielberg, who was honored at the seated dinner. Tiffany Haddish wore a red and black sequined gown and Natasha Lyonne was in a black Area dress with a bedazzled oyster bodice. The night featured performances from Doja Cat and Lea Michelle.

Can you correctly use the word opulent in a sentence?

Based on the definition and example provided, write a sentence using today’s Word of the Day and share it as a comment on this article. It is most important that your sentence makes sense and demonstrates that you understand the word’s definition, but we also encourage you to be creative and have fun.

Then, read some of the other sentences students have submitted and use the “Recommend” button to vote for two original sentences that stand out to you.

If you want a better idea of how opulent can be used in a sentence, read these usage examples on Vocabulary.com.


Students ages 13 and older in the United States and the United Kingdom, and 16 and older elsewhere, can comment. All comments are moderated by the Learning Network staff.

The Word of the Day is provided by Vocabulary.com. Learn more and see usage examples across a range of subjects in the Vocabulary.com Dictionary. See every Word of the Day in this column.

When Restudying Trumps Retrieval

0
When Restudying Trumps Retrieval

by Cindy Nebel

(Cover image from Pixabay by squarefrog.)

We have so many blogs about retrieval practice. In fact, it is the most common tag we use on our blog. If you’re new to this conversation, you can find some summary information about the benefits of retrieval practice here and some additional resources here. In short, there is a wealth of research demonstrating that retrieving information helps individuals retain information better than restudying.

But not always…

One thing that we try to emphasize is that there are no silver bullets. It’s so important to understand the mechanisms that underlie any strategy we’re recommending because when you go to apply it the why it works becomes super important. No strategy works all the time. Not even retrieval practice. (You can see other times we’ve talked about that fact here and here.

Today I want to share a new Open Access article (so you can go read it for yourself if you’d like!) that *spoiler alert! found a situation in which restudying was actually better for retention than retrieval (1).

This study used Swahili-English word pairs for their materials. This is a pretty common strategy when we’re trying to figure out basic mechanisms. Most of our participants don’t have a background in Swahili so it allows us to see how they learn something from scratch instead of worrying about people who might have already known something when the experiment began. Still, there are some limitations here because most of us do not ask our students to memorize foreign language vocab pairs exclusively or at all.

In this study, there were a few experiments. I’m just going to tell you about the first one here. In the first experiment, people were recruited online and participated in five sessions. During the first session, they studied the 40 word pairs. Then on Days 3, 5, and 7 they were given the words in different ways. Some of the word pairs were restudied, but for others the Swahili word was presented and students either just thought about or wrote down the English pair before being shown the correct answer. They labeled these Restudy, Covert Retrieval, and Overt Retrieval. After each restudied word, participants were asked, “Would you have remembered the correct translation?” and rated it out of 100. For the Retrieval groups they were asked how close they were to the correct answer (again, out of 100).

On Day 9, everyone took a final test. And the strangest thing happened…

What Students Are Saying About Barbie

0
What Students Are Saying About Barbie

The dolls ‘used to lack diversity quite a bit.’

My overall view of Barbie dolls is that it used to lack diversity quite a bit, which is something that’s very important to me, however in recent years they have gotten much better in terms of diversifying their toys. I can understand why many people might have a negative view of Barbie, and why they believe that she isn’t the best role model for young girls. The doll has mainly had one image for the past few decades and that has been a white woman with blonde hair and blue eyes. Things like this can help push that white is the norm in the USA, especially to girls of color that enjoy playing with Barbies. There was a time when you could walk into a store and only see dolls that looked the exact same, which was white, blonde, and skinny. However I feel like more progress is being made as time goes on. Despite all of this I feel that the movie handled a lot of these issues in a pretty good way.

— Ru, New York

‘I would have loved to see Barbies who … weren’t all that into pink.’

Personally, when the Barbie movie came out, I had never been interested in the sort of products the brand offered nor was the movie something I was excited about watching. However, when a friend of mine insisted we should go see the film, I begrudgingly said yes and fished to grab my one pink button-up out of my closet. Wow! I was really pleasantly surprised by this movie! Though Barbie has a very light tone, it managed to discuss important issues in a way that definitely made me think. Part of the movie is the fact that it should make you uncomfortable, which forces you to take a good look at the real world. Additionally, the character Alan was very dear to me because he symbolized the experience of not fitting into the “Barbie” or “Ken” category. However, I do feel that the film oversimplified the varied experiences of women. Stereotypical Barbie was just that: stereotypical. I would have loved to see Barbies who didn’t necessarily have high heels and dresses, weren’t all that into pink, and didn’t necessarily partner up with a Ken. Overall, while the movie certainly isn’t perfect, it was definitely something I will keep watching again and again.

— Blake, Glen Ellyn

‘Without Barbie, I wouldn’t value my culture as much as I do today.’

As a child, my bedroom floor was almost always haphazardly covered by a plethora of Barbies. I even remember begging my parents to go to Toys “R” Us only to browse the Barbie aisle. I was obsessed with the idea of having a “perfect” toy. Something about her ubiquitous, embellished features captivated me. Eventually, however, this admiration became envy. Having a reminder of what was “perfect” — only to look back at the mirror and find no similarities — was incredibly dispiriting. Living as an Asian immigrant, I always strived to look like what was most represented — being a white, skinny girl — which I was neither. How could I begin loving myself if the media didn’t? Thus, I started to hate Barbie. The designated Barbie pile I once had was trashed. I assimilated into American culture, disregarding my mother tongue. Rejected my food, my words, and my culture. Gradually though, I began appreciating my identity and ethnic features. It wasn’t a magical change. I had to learn my culture again as if it was an old hobby. I like to think of Barbie as a hallmark. It is representative of the pain I felt, so displaced in a world where I felt like I didn’t belong. But it also represents the progress and change I have gone through. Without Barbie, I wouldn’t value my culture as much as I do today. I wouldn’t cherish my features as much as I do today either. And I love Barbie for that reason.

— Olivia K, Masterman School, Philadelphia, PA


Learn more about Current Events Conversation here and find all of our posts in this column.

How Responsive Web Design Keeps Your Apps Consistent

0
How Responsive Web Design Keeps Your Apps Consistent

Even before all the ubiquitous IoT tech we have today, websites needed to be able to adapt to various monitor sizes. Today, we have a wide range of devices that connect to the web — like smartphones, tablets, laptops, watches, and refrigerators. 

Luckily, web developers don’t need to build unique apps for every single device. (Can you imagine the cost? It’d be unsustainable.) Instead, they use responsive web design to provide their users with a consistent, seamless experience across all of their devices. 

We take a closer look at responsiveness in our free course Learn CSS: Responsive Design — but here’s a quick breakdown.

Learn something new for free

What is responsive design? 

Responsive design ensures a website can adapt to users whether they’re viewing content on a phone, tablet, laptop, or desktop, through Cascading Style Sheets or CSS. In CSS, you use various settings to serve different styles depending on the user’s device. 

Responsive design means the website is automatically configured for the device it’s being viewed on. The fonts, images, and other elements are scaled to make the best use of the screen. 

Why responsive design matters 

Responsive design matters for both users and web developers. For users, it ensures a smooth experience regardless of what device you use to view a website. For developers, it allows you to make one website that users can view on multiple devices rather than just a computer — which is crucial because most web traffic comes from mobile devices. 

Instead of building responsive web apps, some people use redirects to point users to the appropriate version of the website for their device. But this option is clunky and slow and can potentially impact the user experience. It’s also more work for the developers, so creating one well-designed website is a better experience for everyone. 

Why learn responsive design 

If you want to become a web developer, or even just build efficient websites, you’ll need to provide a smooth experience for every device. The design should translate across multiple screen sizes and continue to look visually appealing. 

How HTML and CSS are used in responsive design 

Responsive design uses HTML (HyperText Markup Language) and CSS. HTML determines the content and structure of a web page, while CSS controls how the HTML is designed and displayed. 

With responsive design, each device receives the same HTML. CSS is what alters the appearance of the page. It adjusts the page to conform to the screen in use. 

Responsive images 

One way to see how HTML and CSS work together for responsive website design is by looking at images. For example, you might add an image to a website with the following  HTML: 

”describes

You can also set a class that you can customize with CSS: 

”describes

You include CSS as a separate stylesheet file. You can use CSS to manage the width of all images using the following:

img { 

width: 100%; 

height: auto; 

}

This means that the image will scale down when necessary to fit onto the screen, but it won’t scale up to larger than its original size. 

You can also control a specific class using the following syntax: 

. full-width-img { 

width: 100%; 

height: auto; 

}

Background images should also be responsive. One way to do this is by setting the background-size property to contain, meaning the background image will scale to fit the content area, but it will also keep its aspect ratio (original proportions). Here’s what it would look like using an animated image, image.gif: 

div { 

width: 100%; 

height: 400px; 

background-image: url(‘image.gif’); 

background-repeat: no-repeat; 

background-size: contain; 

border: 1px solid blue; 

}

Another option is to set the background size to 100% 100%, which stretches the background image to cover the content area. It looks like this: 

div { 

width: 100%; 

height: 400px; 

background-image: url(‘image.gif’); 

background-size: 100% 100%; 

border: 1px solid blue; 

}

You can also change the background size to cover, which will scale and keep the aspect ratio, but it may clip the image. 

Setting the viewport 

The viewport is the visible area of a web page. It will be larger on computer screens than tablets and smartphones. Developers can control the viewport by using an HTML tag. 

The example above sets the width of the page to follow the width of the device’s screen. And the initial-scale attribute sets the zoom level when the page is first loaded. 

Responsive grids 

Websites are typically designed using a grid, which divides the page into columns. Grids make it easier to place elements on a page and see how they relate to each other. A responsive grid is fluid, which means the elements can change and move based on the user’s viewport. 

One popular grid option is the Flexbox grid. It uses a 12-column layout in which each column is 8.33% of the layout. You can also build a responsive grid using CSS. If you want to learn more about responsive grids, check out our free course Learn CSS: Flexbox and Grids. 

Media queries 

Media queries, changes to CSS properties if certain conditions are met, are another cornerstone of responsive design. They allow you to add a breakpoint or threshold at which parts of the design will behave differently. For example, you might have a three-column layout on desktops but a one-column layout on smartphones. 

It’s common practice to design for mobile first and then scale up. Here’s what a media query would look like in that case: 

/* For mobile phones: */ 

[class*=”col-”] { 

width: 100%; 

} 

@media only screen and (min-width: 768 px) { 

/* For desktop: */ 

.col-1 {width: 8.33%;} 

.col-2 {width: 16.66%;} 

.col-3 {width: 25%;} 

}

You can also use media queries to change the layout of the page based on its orientation, as well as change fonts or hide elements depending on the screen size. 

Bootstrap 

Another option for responsive web design is using a framework like Bootstrap. A framework provides a foundation that you can personalize and build on. Bootstrap is a free, open-source, front-end framework built on HTML, CSS, and JavaScript. It saves you the time of having to write all of the code yourself and includes a responsive grid, code for responsive images, and code for other elements like navigation bars. 

Bootstrap also has extensive documentation and an enthusiastic community. You can also find Bootstrap templates, which simplify the responsive design process even more. 

Getting started in responsive design 

To learn responsive design, you need a solid grounding in the basics. First, you’ll need to know HTML. Our Learn HTML course is a beginner-friendly course that introduces you to common HTML tags and how to create tables and forms. 

Once you’ve mastered HTML, it’s time to add in CSS. Our Learn CSS course teaches you visual CSS rules, the Box Model, CSS rules for display and positioning, and colors and fonts. 

After you’ve learned HTML and CSS, you have several options. One is to continue building your CSS knowledge. Our Learn Intermediate CSS course teaches you the skills you need for responsive design, including how to use Flexbox to create flexible page layouts. It also teaches you how to build accessible web pages. 

We have a course that focuses exclusively on responsive design. The Responsive Design course is for those who have taken the Learn HTML and Learn CSS courses or have the equivalent knowledge. It covers the elements discussed in this article, including media queries. 

Our Learn Bootstrap course teaches you Bootstrap’s grid system and how to style and populate your site. The Bootstrap course requires knowledge of HTML and some knowledge of CSS is helpful, but not required. 

We also have other web design courses and Skill Paths. Our Build a Website with HTML, CSS, and Github Pages skill path is beginner-friendly and teaches you HTML, CSS, responsive design, accessibility, and Flexbox. At the end of the path, you’ll have developed your own website from start to finish. 

Our How to Make a Website with NameCheap course teaches you HTML, CSS, and Bootstrap. By the end of the course, you’ll have built four simple websites, including a personal portfolio, which is a must-have for any job search. 

If you’re not sure about where to start, feel free to reach out in our Forums or Discord server. We’re happy to help you find the right courses to build your skills and develop the website of your dreams.