Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <!DOCTYPE html>
<html lang="en" >
  <meta charset="UTF-8">
  <title>CodePen - HTML 5.2 new dialog tag</title>
  <link rel="stylesheet" href="">
<link rel='stylesheet' href=',400,700'><link rel="stylesheet" href="./style.css">
<script src=""></script>

<!-- partial:index.partial.html -->
<!-- Simple boîte de dialogue, contenant un formulaire -->
<dialog id="favDialog">
  <form method="dialog">
      <input type="text" name="fname" id="fname"><br><br>
        <input type="text" name="lname" id="lname"><br><br>
        <input type="text" name="age" id="age"><br><br>
      <button id="cancel" type="reset">reset</button>
      <button id="submit" type="submit">submit</button>

<table id="table" border="1">
                <th>First Name</th>
                <th>Last Name</th>
                <td><a id="updateDetails">edit(нажми на меня)</a></td>
                <td><a id="updateDetails">edit</a></td>
                <td><a id="updateDetails">edit</a></td>
               <td><a id="updateDetails">edit</a></td>
                 <td><a id="updateDetails">edit</a></td>

<!-- partial -->
  <script  src="./script.js"></script>
                var table = document.getElementById('table');
                for(var i = 1; i < table.rows.length; i++)
                    table.rows[i].onclick = function()
                         //rIndex = this.rowIndex;
                         document.getElementById("fname").value = this.cells[0].innerHTML;
                         document.getElementById("lname").value = this.cells[1].innerHTML;
                         document.getElementById("age").value = this.cells[2].innerHTML;




                * {
  font-family: "Montserrat", sans-serif;

dialog#favDialog::backdrop {
  background: linear-gradient(135deg, rgba(207, 161, 252, 0.6) 0%, rgba(113, 102, 240, 0.6) 100%);

menu.card {
  margin: 30px auto;
  width: 480px;
  height: 200px;
  box-shadow: 5px 5px 100px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
menu.card p {
  color: #444;
  font-size: 2rem;
  font-weight: 700;

button {
  background: #7367F0;
  background: linear-gradient(135deg, #CE9FFC 0%, #7367F0 100%);
  padding: 10px 15px;
  border-radius: 50px;
  box-shadow: 5px 5px 100px rgba(0, 0, 0, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  transition: background 500ms ease;
button:hover {
  background: #CE9FFC;
  background: linear-gradient(135deg, #CE9FFC 0%, #CE9FFC 100%);
button#cancel {
  background: #E3E3E3;
  background: linear-gradient(135deg, #E3E3E3 0%, #5D6874 100%);
button#cancel:hover {
  background: #5D6874;
  background: linear-gradient(135deg, #E3E3E3 0%, #E3E3E3 100%);
  color: #333;


                (function() {
    var updateButton = document.getElementById('updateDetails');
    var cancelButton = document.getElementById('cancel');
		var submitButton = document.getElementById('submit');

    // Update button opens a modal dialog
    updateButton.addEventListener('click', function() {

    // Bouton pour fermer la boîte de dialogue
    cancelButton.addEventListener('click', function() {

    // Bouton pour fermer la boîte de dialogue
    submitButton.addEventListener('click', function() {
      selectValue = document.getElementById('favAnimal').value;
			if(selectValue == ''){
				 selectValue = '........';
			document.getElementById('resp').innerHTML = selectValue;