Home > Web Front-end > CSS Tutorial > Can HTML Tags Be Used Inside `` Elements?

Can HTML Tags Be Used Inside `` Elements?

Barbara Streisand
Release: 2024-12-18 14:36:10
Original
323 people have browsed it

Can HTML Tags Be Used Inside `` Elements?

Options with HTML Tags within Select Elements

Question:

Can you insert HTML tags into the options of an HTML select element?

For instance:

<select>
    <option value="one"><b>one is bold</b></option>
    <option value="two">two has some <span>
Copy after login

Expected Behavior:

The text within each option should be rendered as HTML.

Answer:

Unfortunately, this is not feasible. The contents of

The above is the detailed content of Can HTML Tags Be Used Inside `` Elements?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template