Advertisement
Python253

content_editable_browser_pad

Mar 23rd, 2024 (edited)
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.55 KB | None | 0 0
  1. <!--
  2. HTML Document: Content Editable Browser Pad
  3.  
  4. This HTML document creates a simple browser pad with a contenteditable div element.
  5. Users can type, edit, and modify the content within the div directly in their web browser.
  6. The pad has a minimum height of 400 pixels and is bordered with a 2-pixel solid line in light gray color for visual distinction.
  7. Additionally, the padding inside the div is set to 10 pixels.
  8.  
  9. Attributes:
  10. - lang: Specifies the language of the document (English).
  11. - charset: Defines the character encoding for the document (UTF-8).
  12. - viewport: Sets the initial scale and width of the viewport for responsive design.
  13. - title: Specifies the title of the document displayed in the browser tab.
  14.  
  15. Tags Used:
  16. - html: The root element of an HTML document.
  17. - head: Contains meta-information about the HTML document.
  18. - meta: Provides metadata about the HTML document, such as character encoding and viewport settings.
  19. - title: Defines the title of the HTML document.
  20. - body: Represents the content of the HTML document.
  21. - div: A block-level element used to create a container with editable content.
  22. - contenteditable: Specifies whether the content of the div element is editable by the user.
  23.  
  24. Styling:
  25. - min-height: Sets the minimum height of the contenteditable div to 400 pixels.
  26. - border: Applies a 2-pixel solid border around the contenteditable div, colored in light gray (#ccc).
  27. - padding: Adds 10 pixels of padding inside the contenteditable div for better spacing.
  28.  
  29. Usage:
  30. - Users can open this HTML document in any web browser and start typing or editing content directly within the contenteditable div.
  31. The browser pad can be useful for taking notes, drafting text, or any other purpose where quick and simple text editing is required.
  32.  
  33. Note:
  34. - Users can directly embed JavaScript code in the address bar of their web browser to execute scripts on the current web page. However, caution should be exercised when executing arbitrary JavaScript code obtained from untrusted sources, as it may pose security risks.
  35.  
  36. How To Embed:
  37. - Input the following command into an empty address bar:
  38.  data:text/html,<html contenteditable><body>Type Anything Here. You Can Even Imbed Your Own JavaScript...</body></html>
  39.  
  40. -->
  41.  
  42. <!DOCTYPE html>
  43. <html lang="en">
  44. <head>
  45.   <meta charset="UTF-8">
  46.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  47.   <title>Content Editable Browser Pad</title>
  48. </head>
  49. <body>
  50.   <div contenteditable="true" style="min-height: 400px; border: 2px solid #ccc; padding: 10px;">
  51.   </div>
  52. </body>
  53. </html>
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement