Monu Tools

מעצב HTML

ייפוי HTML עם הזחה מודעת לבלוקים, או כיווץ שלו. התוכן של pre, ‏textarea, ‏script ו-style נשמר.

כיצד להשתמש במעצב HTML

  1. 01

    הדביקו את ה-HTML שלכם בתיבת הקלט.

  2. 02

    בחרו ייפוי כדי להזיח אותו או כיווץ כדי לדחוס אותו.

  3. 03

    בחרו את גודל ההזחה, ואז העתיקו את התוצאה.

What the HTML formatter does

This is an HTML formatter that beautifies markup with block and inline aware indentation, or minifies it by collapsing whitespace and stripping comments. You pick the indent size when beautifying.

Beautifying indents elements according to how they nest, so the structure of a document, which elements contain which, becomes obvious. That makes hand-written or generated HTML far easier to read and debug.

Both beautify and minify run entirely in your browser, so your markup never leaves your device.

Elements it leaves untouched

It deliberately leaves the contents of pre, textarea, script and style untouched, because whitespace inside those elements is significant: reformatting them would change preformatted text, what users type, or the meaning of your code.

How minifying works

Minifying removes comments and collapses runs of whitespace, which trims the file size browsers have to download. It is most useful as a build step for production pages.

Why it keeps a space between tags

The minifier keeps a single space between tags rather than removing it entirely, because whitespace between inline elements is actually rendered, and dropping it can shift your layout. This caution avoids the subtle visual bugs aggressive minifiers can cause.

שאלות נפוצות

מה עושה ייפוי של HTML?

הוא מזיח את האלמנטים על פי ההיררכיה והמבנה שלהם, ומשאיר את התוכן של pre, ‏textarea, ‏script ו-style ללא שינוי, מאחר שרווחים שם הם משמעותיים.

איך עובד כיווץ HTML?

הוא מסיר הערות ומכווץ רצפים של רווחים לרווח יחיד. הוא שומר על רווחים בודדים בין תגיות במקום להסיר אותם, מכיוון שרווח בין אלמנטים מוטבעים מוצג, והסרתו עלולה להזיז את הפריסה.

האם ה-HTML שלי נשלח לשרת?

לא. גם הייפוי וגם הכיווץ פועלים כולם בדפדפן שלכם, כך שהקוד שלכם לעולם אינו עוזב את המכשיר.

מקורות

הטמע את הכלי הזה

הוסף את הכלי הזה לאתר שלך. העתק את קטע הקוד שלהלן; הוא מתעדכן אוטומטית.

<iframe src="https://monu.tools/embed/he/html-formatter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

כלים קשורים