
Jake Archibald's work on HTML is a game-changer for web developers. He's a key contributor to the HTML specification, which means he helps shape the language we use to build websites.
Jake's expertise in web components is particularly notable. Web components are a set of web platform APIs that allow you to create custom, reusable HTML elements.
Suggestion: Components of Html
Web Components Worth It?
Web components are a powerful tool for building web applications. They allow developers to create custom HTML elements that can be reused throughout a project, making it easier to maintain and update code.
Surma's experience with web components is a great example of their potential. He's worked with various versions of the spec, including the old custom elements 'v0' spec and the old shadow DOM 'v0' spec.
The initial version of Polymer was also a significant milestone in the development of web components. It provided a way to use web components in a more straightforward way.
One of the key benefits of web components is their ability to interact with forms. The ElementInternals API makes this possible, allowing custom elements to work seamlessly with form elements.
HTML attributes vs DOM properties is another important consideration when working with web components. Understanding the difference between these two concepts can help developers create more robust and maintainable code.
Here are some examples of web components in action:
- Lit (formally lit-html) is a popular library for building web components.
- The pinch-zoom custom element is a great example of how web components can be used to create interactive and engaging user experiences.
Custom element support in React 19 is also worth noting. This feature makes it easier to integrate web components into React applications.
Overall, web components are a valuable tool for any web developer. With their flexibility and power, they can help create more efficient, maintainable, and user-friendly web applications.
Additional reading: Developing Web Apps
Attributes and Properties
Attributes and properties do the same thing, but they behave differently.
A user can change the value of an input, but the attribute will still be the original value. For example, if you delete "Pesto" and replace it with "Bolognese", the attribute will still be "Pesto".
Properties respond to changes in the input value, but attributes don't. This is why the value property is used when submitting a form, not the attribute.
Not all properties have corresponding attributes. HTML elements have an innerHTML property, but no innerHTML attribute.
Properties can contain non-string data, which is different from attributes. The maxLength property, for example, accepts a number, but the maxlength attribute is always a string.
Worth a look: Html Class Property
Properties and Data
Properties in HTML are quite flexible when it comes to the type of data they can hold. They can contain a variety of data types, such as numbers, objects, and boolean values.
The input element's maxLength property is a great example of this. It accepts a number, which is different from the maxlength attribute that's set as a string in HTML.
In fact, the browser will automatically convert the string value of the maxlength attribute to a number when syncing it with the maxLength property.
Take a look at this: Html Property Attribute
Boolean Attributes Explained
Boolean attributes are either present or not present, representing either true or false. Some common boolean attributes include the checked attribute.
The checked attribute is treated as true if it's present at all, and the browser renders a checked checkbox for each one. This means you can add the checked attribute to a checkbox and it will be checked.
To turn off a boolean attribute, you need to remove it from the element completely. This can be done using the removeAttribute() or toggleAttribute() methods of the input element.
On a similar theme: Html Tag B
Featured Images: pexels.com


