Semantic HTML is using specific tags when writing HTML. These tags convey meaning about their intended purpose. Both humans and computers can understand the meaning of your code when you use them. Browsers, search engines and assistive technologies use these tags to create a better user experience.
Why should I use it?
It makes your code easy to read. You’ll be able to scan quickly through the code to understand how it is structured. Semantic tags also make it faster to write code. You don’t have as many decisions to make when you use the semantic tags.
How to get started?
HTML5 introduced new tags – semantic tags. Tags like <header>, <main> and <footer>. With these tags, you create a web page structure that is readable to both search engines and people.
Your main content lives inside <main>. You can use tags like <p> and heading tags like <h1> to provide some structure. To provide further meaning to the content, use tags like <article> and <section>. The <article> tag contains content that can be removed and put on another page. You can use the <section> tag when you need to wrap groups of related content. Use the HTML semantics cheat sheet to learn when to use which tags for the right job.
What about the <div> tag?
HTML has non-semantic tags like <div>. Its generic nature allows you to define its purpose through code. You can use the <div> and <span> tags in your code. Use them to group elements that don’t have any specific meaning. When you need more specific meaning, choose semantic tags over non-semantic ones.
Everyone can feel tired, bored or exhausted from doing work. Why? Too busy. Your tasks are repetitive and unchallenging. Or you deal with people who drain you. You need to focus on things that you can control to help deal with developer burnout.
Here’s a list of things to try:
Take a day off and do nothing. Relax, sleep or go somewhere different.
Change your sleep routine. It may need a bit of tweaking. You may need to change your nightly routine.
Break a habit or pattern. Take a different route to work. Eat at a new place for lunch.
Whether you are a beginner or experienced programmer, programming keeps changing. You have to keep up with the changes. How do improve your coding skills?
Most people learn by doing. You get better by writing code and sharing what you learn. Or getting involved with the programming community. To keep improving your coding skills, use the following tips:
1. Write code every day
Write code. Experiment with new ideas. Learn how others write code through copy work. It is the process of recreating an existing work as closely as possible. Writers and painters use this technique to improve their skills.
2. Read books
Why read books? Programming books can explore a topic more deeply than an online tutorial. They show you code in detail. You can reread it and gain new insights.
You can find podcasts on any topic. Pick from coding to tech news. Find one or more to get tips, tricks or updates on new technology. Don’t know where to start? Try FreeCodeCamp’s list of best tech podcasts for software developers.
5. Take a class
Pick a class to learn more about a programming topic or to pick up a specific skill. Get started with sites like Treehouse or FreeCodeCamp.
A quiz topic. I love to eat chocolate. Chocolate is a fun quiz topic. I compiled a list of questions on chocolate.
I wanted to use FlexBox for the layout. Plus a counter that shows you what question you are on. I included a photo of chocolate as well.
Building the app
The structure for a quiz is simple. It should display a question, a list of answers and track the number of questions that you get right. Then, it shows you summary of how well you did at the end. Plus, it should give you the option to try again.
I started with a simple quiz tutorial and modified it. First, I edited the code to include my questions on chocolate. Then, I looked at a quiz example with a timer and modified my code to add question counter.
Finally, I updated the code to include the chocolate photo into the results. It required adding one line of code.
I wanted to add a sticky footer to the bottom of the web app. The web page uses FlexBox. I need to modify the layout to create the footer using FlexBox. CSS-Tricks’ FlexBox option fit well with the app design.
I wanted to use a gradient for the background. You can either use a CSS gradient generator to create it. Or use one created by designers. Gradient Hunt lets you choose from a selection of pre-made gradients.
What to do differently
A quiz on chocolate needs more photos of it. The design would need to show more chocolate as you move through the quiz. Next, I would like to show chocolate facts with each question. Each question has to have four answers; no true or false. I would change it so I can add true or false questions.
If you like chocolate and want to take a quiz, try out this Chocolate Quiz.
Every day is a bit different. You may have new priorities and problems to solve. Meetings and issues that require your attention. Developers need to focus on the code they are writing. When you stop working, it can be hard to get back into a development flow.
What is flow? Flow is described as a cognitive state where you are completely absorbed in an activity. You are intensely focusing on your chosen activity.
Returning to your work
There are times when you need to stop working. You have to go to a meeting, eat lunch or leave work for the day. When you return, it takes time to get back into state of flow. What can you do to help get back into your development flow?
1) Leave yourself note
The simplest thing you can do is leave yourself a note. You can leave a comment in your code to remind yourself what to do next. Use email or have a tool like Slack remind you of what you were working on.
2) Rule of 3
Before you leave for the day, write down three things that you want to accomplish. When you start work the next day, work on those three things. J.D. Meier explains why the rule of three is a simple way to get results.
3) Make a shutdown process
A shutdown process is a set of tasks that you do to help you finish up for the day and prepare for the next work day. Workday shutdown rituals help you to separate your work day and personal time.