Skip to content

Commit

Permalink
Remove 'simple' part 5: the rest of HTML directory (#36775)
Browse files Browse the repository at this point in the history
* Remove 'simple' part 5: the rest of HTML directory

* Update files/en-us/web/html/date_and_time_formats/index.md

Co-authored-by: Chris Mills <[email protected]>

---------

Co-authored-by: Chris Mills <[email protected]>
  • Loading branch information
estelle and chrisdavidmills authored Nov 21, 2024
1 parent f10015d commit 4d36051
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/html/attributes/pattern/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ If we had used [`minlength`](/en-US/docs/Web/HTML/Attributes/minlength) and [`ma

### Specifying a pattern

You can use the [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern) attribute to specify a regular expression that the inputted value must match in order to be considered valid (see [Validating against a regular expression](/en-US/docs/Learn/Forms/Form_validation#validating_against_a_regular_expression) for a simple crash course on using regular expressions to validate inputs).
You can use the [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern) attribute to specify a regular expression that the inputted value must match in order to be considered valid (see [Validating against a regular expression](/en-US/docs/Learn/Forms/Form_validation#validating_against_a_regular_expression) for a crash course on using regular expressions to validate inputs).

The example below restricts the value to 4-8 characters and requires that it contain only lower-case letters.

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/attributes/rel/preload/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Here however, we will use a `rel` value of `preload`, which turns `<link>` into
- The path to the resource in the [`href`](/en-US/docs/Web/HTML/Element/link#href) attribute.
- The type of resource in the [`as`](/en-US/docs/Web/HTML/Element/link#as) attribute.

A simple example might look like this (see our [JS and CSS example source](https://github.com/mdn/html-examples/tree/main/link-rel-preload/js-and-css), and [also live](https://mdn.github.io/html-examples/link-rel-preload/js-and-css/)):
An example might look like this (see our [JS and CSS example source](https://github.com/mdn/html-examples/tree/main/link-rel-preload/js-and-css), and [also live](https://mdn.github.io/html-examples/link-rel-preload/js-and-css/)):

```html
<head>
Expand Down Expand Up @@ -181,7 +181,7 @@ We include `media` attributes on our `<link>` elements so that a narrow image is

This makes it much more likely that the font will be available for the page render, cutting down on FOUT (flash of unstyled text).

This doesn't have to be limited to images, or even files of the same type — think big! You could perhaps preload and display a simple SVG diagram if the user is on a narrow screen where bandwidth and CPU is potentially more limited, or preload a complex chunk of JavaScript then use it to render an interactive 3D model if the user's resources are more plentiful.
This doesn't have to be limited to images, or even files of the same type — think big! You could perhaps preload and display a simplified SVG diagram if the user is on a narrow screen where bandwidth and CPU is potentially more limited, or preload a complex chunk of JavaScript then use it to render an interactive 3D model if the user's resources are more plentiful.

## Scripting and preloads

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/constraint_validation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For a basic introduction to these concepts, with examples, see the [Form validat
In HTML, basic constraints are declared in two ways:

- By choosing the most semantically appropriate value for the [`type`](/en-US/docs/Web/HTML/Element/input#type) attribute of the {{ HTMLElement("input") }} element, e.g., choosing the `email` type automatically creates a constraint that checks whether the value is a valid email address.
- By setting values on validation-related attributes, allowing basic constraints to be described in a simple way, without the need for JavaScript.
- By setting values on validation-related attributes, allowing basic constraints to be described without the need for JavaScript.

### Semantic input types

Expand Down Expand Up @@ -298,7 +298,7 @@ The postal code format varies from one country to another. Not only do most coun
> [!NOTE]
> This is not a comprehensive postal code validation library, but rather a demonstration of the key concepts.
As an example, we will add a script checking the constraint validation for this simple form:
As an example, we will add a script checking the constraint validation for a form:

```html
<form>
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/date_and_time_formats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ Because of data storage and precision issues, you may want to be aware of a few

JavaScript uses double precision floating points to store dates, as with all numbers, meaning that JavaScript code will not suffer from the Y2K38 problem unless integer coercion/bit-hacks are used because all JavaScript bit operators use 32-bit signed 2s-complement integers.

The problem is with the server side of things: storage of dates greater than 2^31 - 1. To fix this problem, you must store all dates using either unsigned 32-bit integers, signed 64-bit integers, or double-precision floating points on the server. If your server is written in PHP, the fix may be as simple as upgrading to PHP 8 or 7, and upgrading your hardware to x86_64 or IA64. If you are stuck with other hardware, you can try to emulate 64-bit hardware inside a 32-bit virtual machine, but most VMs don't support this kind of virtualization, since stability may suffer, and performance will definitely suffer greatly.
The problem is with the server side of things: storage of dates greater than 2^31 - 1. To fix this problem, you must store all dates using either unsigned 32-bit integers, signed 64-bit integers, or double-precision floating points on the server. If your server is written in PHP, the fix may require upgrading your PHP to a more recent version, and upgrading your hardware to x86_64 or IA64. If you are stuck with other hardware, you can try to emulate 64-bit hardware inside a 32-bit virtual machine, but most VMs don't support this kind of virtualization, since stability may suffer, and performance will definitely suffer greatly.

### The Y10k Problem (often client-side)

Expand All @@ -414,7 +414,7 @@ The problem is with the client side of things: parsing of dates with more than 4
<input type="datetime-local" value="+010000-01-01T05:00" />
```

It's that simple. Just prepare your code for any number of digits. Do not only prepare for 5 digits. Here is JavaScript code for programmatically setting the value:
We need to prepare our code for any number of digits not just 5. The following JavaScript function programmatically sets the value:

```js
function setValue(element, date) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you plan to use {{domxref("HTMLElement.dataset")}}, the portion of the attrib

### Usage

By adding `data-*` attributes, even ordinary HTML elements can become rather complex and powerful program-objects. For example, a space-ship "[sprite](<https://en.wikipedia.org/wiki/Sprite_(computer_graphics)>)_"_ in a game could be a simple {{HTMLElement("img")}} element with a [`class`](/en-US/docs/Web/HTML/Global_attributes/class) attribute and several `data-*` attributes:
By adding `data-*` attributes, even ordinary HTML elements can become rather complex and powerful program-objects. For example, a space-ship "[sprite](<https://en.wikipedia.org/wiki/Sprite_(computer_graphics)>)_"_ in a game could just be an {{HTMLElement("img")}} element with a [`class`](/en-US/docs/Web/HTML/Global_attributes/class) attribute and several `data-*` attributes:

```html
<img
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/microdata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: guide

{{HTMLSidebar}}

Microdata is part of the {{glossary("WHATWG")}} HTML Standard and is used to nest metadata within existing content on web pages. Search engines and web crawlers can extract and process microdata from a web page and use it to provide a richer browsing experience for users. Search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users. Microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties. Microdata is an attempt to provide a simpler way of annotating HTML elements with machine-readable tags than the similar approaches of using RDFa and classic microformats.
Microdata is part of the {{glossary("WHATWG")}} HTML Standard and is used to nest metadata within existing content on web pages. Search engines and web crawlers can extract and process microdata from a web page and use it to provide a richer browsing experience for users. Search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users. Microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties. Microdata is an attempt to provide a declarative way of annotating HTML elements with machine-readable tags than the similar approaches of using RDFa and classic microformats.

At a high level, microdata consists of a group of name-value pairs. The groups are called items, and each name-value pair is a property. Items and properties are represented by regular elements.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/microformats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ page-type: guide

Microformats use supporting vocabularies to describe objects and name-value pairs to assign values to their properties. The properties are carried in class attributes that can be added to any HTML element, while the data values re-use HTML element content and semantic attributes.

Microformats2 (sometimes referred to as mf2) is an update to microformats that provides a simpler way of annotating HTML structured syntax and vocabularies than previous approaches of using RDFa and microdata. These previous approaches require learning new attributes.
Microformats2 (sometimes referred to as mf2) is an update to microformats that provides a method of annotating HTML structured syntax and vocabularies than previous approaches of using RDFa and microdata. These previous approaches require learning new attributes.

There are [open source parsing libraries for most languages](https://microformats.org/wiki/microformats2#Parsers) for microformats2.

Expand Down

0 comments on commit 4d36051

Please sign in to comment.