Skip to content

Commit

Permalink
Remove simple 4: change to basic in HTML section
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle committed Nov 13, 2024
1 parent ddd4a5e commit 8edd7d3
Show file tree
Hide file tree
Showing 26 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/fieldset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You can feel free to style the `<fieldset>` and `<legend>` in any way you want t

### Basic fieldset

This example shows a really simple `<fieldset>` example, with a `<legend>`, and a single control inside it.
This example shows a basic `<fieldset>` example, with a `<legend>`, and a single control inside it.

```html
<form action="#">
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Buttons don't participate in constraint validation; they have no real value to b

## Examples

The below example shows a very simple drawing app created using a {{htmlelement("canvas")}} element and some simple CSS and JavaScript (we'll hide the CSS for brevity). The top two controls allow you to choose the color and size of the drawing pen. The button, when clicked, invokes a function that clears the canvas.
The below example shows a very simple drawing app created using a {{htmlelement("canvas")}} element and some CSS and JavaScript (we'll hide the CSS for brevity). The top two controls allow you to choose the color and size of the drawing pen. The button, when clicked, invokes a function that clears the canvas.

```html
<div class="toolbar">
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/checkbox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Checkboxes do support [validation](/en-US/docs/Web/HTML/Constraint_validation) (

## Examples

The following example is an extended version of the "multiple checkboxes" example we saw above — it has more standard options, plus an "other" checkbox that when checked causes a text field to appear to enter a value for the "other" option. This is achieved with a simple block of JavaScript. The example includes implicit labels, with the `<input>` directly inside the `<label>`. The text input, without a visible label, includes the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute which provides its accessible name. This example also includes some CSS to improve the styling.
The following example is an extended version of the "multiple checkboxes" example we saw above — it has more standard options, plus an "other" checkbox that when checked causes a text field to appear to enter a value for the "other" option. This is achieved with a short block of JavaScript. The example includes implicit labels, with the `<input>` directly inside the `<label>`. The text input, without a visible label, includes the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute which provides its accessible name. This example also includes some CSS to improve the styling.

### HTML

Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/html/element/input/color/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ browser-compat: html.elements.input.type_color

{{HTMLElement("input")}} elements of type **`color`** provide a user interface element that lets a user specify a color, either by using a visual color picker interface or by entering the color into a text field in `#rrggbb` hexadecimal format.

Only simple colors (without alpha channel) are allowed though CSS colors has more formats, e.g. color names, functional notations and a hexadecimal format with an alpha channel.
Only basic hexadecimal colors (without alpha channel) are allowed though CSS colors has more formats, e.g. color names, functional notations and a hexadecimal format with an alpha channel.

The element's presentation may vary substantially from one browser and/or platform to another—it might be a simple textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window.
The element's presentation may vary substantially from one browser and/or platform to another—it might be a basic textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window.

{{EmbedInteractiveExample("pages/tabbed/input-color.html", "tabbed-standard")}}

Expand All @@ -28,7 +28,7 @@ Inputs of type `color` are simple, due to the limited number of attributes they

### Providing a default color

You can update the simple example above to set a default value, so that the color picker is pre-filled with the default color and the color picker (if any) will also default to that color:
You can update the example above to set a default value, so that the color picker is pre-filled with the default color and the color picker (if any) will also default to that color:

```html
<input type="color" value="#ff0000" />
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/date/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ In this section, we'll look at basic and then more complex uses of `<input type=

### Basic uses of date

The simplest use of `<input type="date">` involves one `<input>` combined with its {{htmlelement("label")}}, as seen below:
The most basic use of `<input type="date">` involves one `<input>` combined with its {{htmlelement("label")}}, as seen below:

```html
<form action="https://example.com">
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/element/input/datetime-local/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ browser-compat: html.elements.input.type_datetime-local

{{EmbedInteractiveExample("pages/tabbed/input-datetime-local.html", "tabbed-shorter")}}

The control's UI varies in general from browser to browser. In browsers with no support, these degrade gracefully to simple [`<input type="text">`](/en-US/docs/Web/HTML/Element/input/text) controls.
The control's UI varies in general from browser to browser. In browsers with no support, these degrade gracefully as if [`<input type="text">`](/en-US/docs/Web/HTML/Element/input/text) were set.

The control is intended to represent _a local date and time_, not necessarily _the user's local date and time_. In other words, the input allows any valid combination of year, month, day, hour, and minute—even if such a combination is invalid in the user's local time zone (such as the one hour within a daylight saving time spring-forward transition gap).

Expand Down Expand Up @@ -174,7 +174,7 @@ input:valid + span::after {

### Basic uses of datetime-local

The simplest use of `<input type="datetime-local">` involves a basic `<input>` and {{htmlelement("label")}} element combination, as seen below:
The most basic use of `<input type="datetime-local">` involves a basic `<input>` and {{htmlelement("label")}} element combination, as seen below:

```html
<form>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/email/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ An appropriate [`placeholder`](/en-US/docs/Web/HTML/Element/input#placeholder) i

![Invalid email address in error state with a popout from the input reading 'please enter an email address'.](enter-valid-email-address.png)

If we left things at that, we would at least be validating on legitimate email addresses. But we want to go one step farther: we want to make sure that the email address is in fact in the form `[username]@beststartupever.com`. This is where we'll use [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern). We set `pattern` to `[email protected]`. This simple regular expression requests a string that consists of at least one character of any kind, then an "@" followed by the domain name "beststartupever.com".
If we left things at that, we would at least be validating on legitimate email addresses. But we want to go one step farther: we want to make sure that the email address is in fact in the form `[username]@beststartupever.com`. This is where we'll use [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern). We set `pattern` to `[email protected]`. This regular expression requests a string that consists of at least one character of any kind, then an "@" followed by the domain name "beststartupever.com".

Note that this is not even close to an adequate filter for valid email addresses; it would allow things such as " @beststartupever.com" (note the leading space) or "@@beststartupever.com", neither of which is valid. However, the browser runs both the standard email address filter _and_ our custom pattern against the specified text. As a result, we wind up with a validation which says "make sure this resembles a valid email address, and if it is, make sure it's also a beststartupever.com address."

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/hidden/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This is the content of my excellent blog post. I hope you enjoy it!
</form>
```

Let's also add some simple CSS:
Let's also add some CSS:

```css
html {
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/image/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ The following example shows the same button as before, but included in the conte

#### CSS

And now some simple CSS to make the basic elements sit more neatly:
And now some CSS to make the basic elements sit more neatly:

```css
div {
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/month/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ We'll look at basic and more complex uses of `<input type="month">`, then offer

### Basic uses of month

The simplest use of `<input type="month">` involves a basic {{HTMLElement("input")}} and {{htmlelement("label")}} element combination, as seen below:
The most basic use of `<input type="month">` involves a basic {{HTMLElement("input")}} and {{htmlelement("label")}} element combination, as seen below:

```html
<form>
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/element/input/number/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The `number` input type should only be used for incremental numbers, especially
> Logically, you should not be able to enter characters inside a number input other than numbers. Some browsers allow invalid characters, others do not; see [Firefox bug 1398528](https://bugzil.la/1398528).
> [!NOTE]
> A user can tinker with your HTML behind the scenes, so your site _must not_ use simple client-side validation for any security purposes. You _must_ verify on the server side any transaction in which the provided value may have security implications of any kind.
> A user can tinker with your HTML behind the scenes, so your site _must not_ use client-side validation for security purposes. You _must_ verify on the server side any transaction in which the provided value may have security implications of any kind.
Mobile browsers further help with the user experience by showing a special keyboard more suited for entering numbers when the user tries to enter a value.

Expand Down Expand Up @@ -144,7 +144,7 @@ In this updated version, you should find that the up and down step buttons will

### Allowing decimal values

One issue with number inputs is that their step size is 1 by default. If you try to enter a number with a decimal (such as "1.0"), it will be considered invalid. If you want to enter a value that requires decimals, you'll need to reflect this in the `step` value (e.g. `step="0.01"` to allow decimals to two decimal places). Here's a simple example:
One issue with number inputs is that their step size is 1 by default. If you try to enter a number with a decimal (such as "1.0"), it will be considered invalid. If you want to enter a value that requires decimals, you'll need to reflect this in the `step` value (e.g. `step="0.01"` to allow decimals to two decimal places). Here's a basic example:

```html
<input type="number" placeholder="1.0" step="0.01" min="0" max="10" />
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/password/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ The [`inputmode`](/en-US/docs/Web/HTML/Element/input#inputmode) is set to `numer

#### JavaScript

This is just some simple code to display the entered SSN onscreen so you can see it. Obviously this defeats the purpose of a password field, but it's helpful for experimenting with the `pattern`.
This is just some JavaScript code to display the entered SSN onscreen so you can see it. Obviously this defeats the purpose of a password field, but it's helpful for experimenting with the `pattern`.

```js
const ssn = document.getElementById("ssn");
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/reset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Buttons don't participate in constraint validation; they have no real value to b

## Examples

We've included simple examples above. There isn't really anything more to say about reset buttons.
We've included basic examples above. There isn't really anything more to say about reset buttons.

## Technical summary

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ If you try to submit the form with less than 4 characters, you'll be given an ap

### 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 follow 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).
You can use the [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern) attribute to specify a regular expression that the inputted value must follow 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).

Let's look at an example. Say we wanted to provide a product ID search form, and the IDs were all codes of two letters followed by four numbers. The following example covers it:

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/submit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Submit buttons don't participate in constraint validation; they have no real val

## Examples

We've included simple examples above. There isn't really anything more to say about submit buttons. There's a reason this kind of control is sometimes called a "simple button."
We've included basic examples above. There isn't really anything more to say about submit buttons. There's a reason this kind of control is sometimes called a "simple button."

## Technical Summary

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/element/input/tel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Notice how the entered value is reported as invalid unless the pattern xxx-xxx-x

## Examples

In this example, we present a simple interface with a {{htmlelement("select")}} element that lets the user choose which country they're in, and a set of `<input type="tel">` elements to let them enter each part of their phone number; there is no reason why you can't have multiple `tel` inputs.
In this example, we present a {{htmlelement("select")}} element that lets the user choose which country they're in, and a set of `<input type="tel">` elements to let them enter each part of their phone number; there is no reason why you can't have multiple `tel` inputs.

Each input has a [`placeholder`](/en-US/docs/Web/HTML/Element/input#placeholder) attribute to show a hint to sighted users about what to enter into it, a [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern) to enforce a specific number of characters for the desired section, and an [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute to contain a hint to be read out to screen reader users about what to enter into it.

Expand Down Expand Up @@ -359,7 +359,7 @@ Each input has a [`placeholder`](/en-US/docs/Web/HTML/Element/input#placeholder)
</form>
```

The JavaScript is relatively simple — it contains an {{domxref("HTMLElement.change_event", "onchange")}} event handler that, when the `<select>` value is changed, updates the `<input>` element's `pattern`, `placeholder`, and `aria-label` to suit the format of telephone numbers in that country/territory.
The JavaScript contains an {{domxref("HTMLElement.change_event", "onchange")}} event handler that, when the `<select>` value is changed, updates the `<input>` element's `pattern`, `placeholder`, and `aria-label` to suit the format of telephone numbers in that country/territory.

```js
const selectElem = document.querySelector("select");
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/text/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ If you try to submit the form with less than 4 characters, you'll be given an ap
### 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
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/time/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ When `any` is set as the value for `step`, the default 60 seconds is used, and t

### Basic uses of time

The simplest use of `<input type="time">` involves a basic `<input>` and {{htmlelement("label")}} element combination, as seen below:
The most basic use of `<input type="time">` involves a basic `<input>` and {{htmlelement("label")}} element combination, as seen below:

```html
<form>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/week/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ We'll look at basic and more complex uses of `<input type="week">`, then offer a

### Basic uses of week

The simplest use of `<input type="week">` involves a basic `<input>` and {{htmlelement("label")}} element combination, as seen below:
The most basic use of `<input type="week">` involves a basic `<input>` and {{htmlelement("label")}} element combination, as seen below:

```html
<form>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To link an external stylesheet, you'd include a `<link>` element inside your {{H
<link href="main.css" rel="stylesheet" />
```

This simple example provides the path to the stylesheet inside an `href` attribute, and a [`rel`](/en-US/docs/Web/HTML/Attributes/rel) attribute with a value of `stylesheet`. The `rel` stands for "relationship", and is one of the key features of the `<link>` element — the value denotes how the item being linked to is related to the containing document.
This basic example provides the path to the stylesheet inside an `href` attribute, and a [`rel`](/en-US/docs/Web/HTML/Attributes/rel) attribute with a value of `stylesheet`. The `rel` stands for "relationship", and is one of the key features of the `<link>` element — the value denotes how the item being linked to is related to the containing document.

There are a number of other common types you'll come across. For example, a link to the site's favicon:

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/rt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This element only includes the [global attributes](/en-US/docs/Web/HTML/Global_a

### Using ruby annotations

This simple example provides Romaji transliteration for the kanji characters within the {{HTMLElement("ruby")}} element:
This basic example provides Romaji transliteration for the kanji characters within the {{HTMLElement("ruby")}} element:

```html
<ruby> 漢 <rt>Kan</rt> 字 <rt>ji</rt> </ruby>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/samp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ samp {

### Basic example

In this simple example, a paragraph includes an example of the output of a program.
In this basic example, a paragraph includes an example of the output of a program.

```html
<p>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/select/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ The `<hr>` within a `<select>` should be considered purely decorative, as they a

### Basic select

The following example creates a very simple dropdown menu, the second option of which is selected by default.
The following example creates a three-value dropdown menu, the second option of which is selected by default.

```html
<!-- The second value will be selected initially -->
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/summary/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Below are some examples showing `<summary>` in use. You can find more examples i

### Basic example

A simple example showing the use of `<summary>` in a {{HTMLElement("details")}} element:
A basic example showing the use of `<summary>` in a {{HTMLElement("details")}} element:

```html
<details open>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/u/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ browser-compat: html.elements.u

{{HTMLSidebar}}

The **`<u>`** [HTML](/en-US/docs/Web/HTML) element represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. This is rendered by default as a simple solid underline, but may be altered using CSS.
The **`<u>`** [HTML](/en-US/docs/Web/HTML) element represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. This is rendered by default as a single solid underline, but may be altered using CSS.

> [!WARNING]
> This element used to be called the "Underline" element in older versions of HTML, and is still sometimes misused in this way. To underline text, you should instead apply a style that includes the CSS {{cssxref("text-decoration")}} property set to `underline`.
Expand Down
Loading

0 comments on commit 8edd7d3

Please sign in to comment.