search

Slow Movement

Apr 01, 2025 am 04:51 AM

Slow Movement

Once upon a time, I was confused by the rapid development of network technology. It seems that new plug-ins, frameworks, technologies or language features are released every day. I firmly believe that in order to survive and to compete among freelancers, I have to learn everything else good at : Webpack, React, Angular, SVGs, Houdini, CSS Grid layout, ES6, and so on. Being active on Twitter and attending various meetings hasn't helped me with this problem because I'm constantly exposed to everything new .

Slow down

At some point, I gave up. I decided I couldn't keep up with the pace. From a career perspective, this has not changed anything about me, because in fact, no one expects me to know everything, and this feeling I had before was only in my personal perception. Slowing it down was a wise decision because it not only relieved my mental stress, it also helped me focus on what I really wanted to learn. I still read newsletters, blogs, and Twitter and still spend some time trying new things occasionally, but I don't put pressure on myself. I try to stay up to date, but I don't feel the need to master all the knowledge.

This is how I have been dealing with the development of network technology for the past few years, but recently, especially this year, I have learned something new. It is not a framework or language—it is an insight that in our desire for innovation and progress, we ignore the many features that leverage HTML, CSS and JavaScript today. In other words: if we look back at the past rather than looking into the future, we can learn a lot.

Don't chase the waterfall

I say this is ignoring because I believe there is a huge gap between the front-end language knowledge we think we know and the knowledge we should actually know.

HTML

Checking the website and evaluating its front-end quality is part of my job and hobby. I've looked at the underlying code for many websites and I can only confirm what web accessibility experts are promoting every day: Most HTML documents are in a bad state. If you don't believe me, look at these data:

  • Of the top 1,000,000 homepages, 98.1% of the detectable WCAG 2 errors exist.
  • Thousands of websites contain<h7></h7> and<h8></h8> element.
  • After titles and metadata, div is the most popular element.
  • On average, we only used about 30 of the 110+ available elements.

There is a huge difference between understanding HTML syntax and knowing how to use it correctly. We can all review some things when writing well-structured and semantic HTML documents. In 2020, I spent a lot of time learning HTML and I hope the users of the website I built will benefit from my insights.

Two of my favorite things about HTML I learned in 2020:

You can change the name of the downloadable file by defining a value in download property.
 <a download="report.pdf" href="https://www.php.cn/link/4bf2689c42aae35e6924a432e435e0b1">Download (2MB)</a>
You can use value attribute to change the number in the ordered list.
<ol>
<li value="3"> C</li>
  <li value="2">B</li>
  <li value="1">A</li>
</ol>

CSS

Almost every time I look up CSS properties on MDN or CSS-Tricks, I find something new. Try it yourself. Search for margin , list-style-type or color . I'm sure you'll learn something.

The list of content I learned about CSS in 2020 is long, here are two of my favorite points.

You can use url() function as (part of) the value of content property.
 div::before {
  content: url('marker-icon.png');
}
You can implement native smooth scrolling in CSS.
 /* Anime scrolling only if the user does not prefer reducing motion*/
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Add some spacing between the target and the top of the viewport*/
  :target {
    scroll-margin-top: 0.8em;
  }
}

JavaScript

I write JavaScript a lot, but it's not my core strength, so I've been learning new things about it. Here are two of my favorite points this year:

You can use the nomodule property to run JavaScript code only in browsers that do not support JavaScript modules.
 // nomodule.js
  console.log('This browser doesn't support JS Modules.');

// module.js
  console.log('This browser supports JS Modules.');

in conclusion

HTML is the backbone of every website; knowing how to write semanticized documents should be the top priority for every web developer. CSS is very complex to some extent, and in order to learn new concepts, we must understand their comparison with old technologies, and the problems they solve. JavaScript frameworks and libraries are emerging in an endless stream, but they all have one thing in common, that is, they are written in native JavaScript.

In 2020, I re-learned what I have forgotten and discovered new knowledge about established elements and attributes. If you only look for it, you will find a lot of hidden knowledge. I will expand on this topic further in 2021 because there is still a lot of great things to explore.

The above is the detailed content of Slow Movement. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is CSS Grid?What is CSS Grid?Apr 30, 2025 pm 03:21 PM

CSS Grid is a powerful tool for creating complex, responsive web layouts. It simplifies design, improves accessibility, and offers more control than older methods.

What is CSS flexbox?What is CSS flexbox?Apr 30, 2025 pm 03:20 PM

Article discusses CSS Flexbox, a layout method for efficient alignment and distribution of space in responsive designs. It explains Flexbox usage, compares it with CSS Grid, and details browser support.

How can we make our website responsive using CSS?How can we make our website responsive using CSS?Apr 30, 2025 pm 03:19 PM

The article discusses techniques for creating responsive websites using CSS, including viewport meta tags, flexible grids, fluid media, media queries, and relative units. It also covers using CSS Grid and Flexbox together and recommends CSS framework

What does the CSS box-sizing property do?What does the CSS box-sizing property do?Apr 30, 2025 pm 03:18 PM

The article discusses the CSS box-sizing property, which controls how element dimensions are calculated. It explains values like content-box, border-box, and padding-box, and their impact on layout design and form alignment.

How can we animate using CSS?How can we animate using CSS?Apr 30, 2025 pm 03:17 PM

Article discusses creating animations using CSS, key properties, and combining with JavaScript. Main issue is browser compatibility.

Can we add 3D transformations to our project using CSS?Can we add 3D transformations to our project using CSS?Apr 30, 2025 pm 03:16 PM

Article discusses using CSS for 3D transformations, key properties, browser compatibility, and performance considerations for web projects.(Character count: 159)

How can we add gradients in CSS?How can we add gradients in CSS?Apr 30, 2025 pm 03:15 PM

The article discusses using CSS gradients (linear, radial, repeating) to enhance website visuals, adding depth, focus, and modern aesthetics.

What are pseudo-elements in CSS?What are pseudo-elements in CSS?Apr 30, 2025 pm 03:14 PM

Article discusses pseudo-elements in CSS, their use in enhancing HTML styling, and differences from pseudo-classes. Provides practical examples.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.