ייפוי HTML עם הזחה מודעת לבלוקים, או כיווץ שלו. התוכן של pre, textarea, script ו-style נשמר.
כיצד להשתמש במעצב HTML
הדביקו את ה-HTML שלכם בתיבת הקלט.
בחרו ייפוי כדי להזיח אותו או כיווץ כדי לדחוס אותו.
בחרו את גודל ההזחה, ואז העתיקו את התוצאה.
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.
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.
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.
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.
שאלות נפוצות
הוא מזיח את האלמנטים על פי ההיררכיה והמבנה שלהם, ומשאיר את התוכן של pre, textarea, script ו-style ללא שינוי, מאחר שרווחים שם הם משמעותיים.
הוא מסיר הערות ומכווץ רצפים של רווחים לרווח יחיד. הוא שומר על רווחים בודדים בין תגיות במקום להסיר אותם, מכיוון שרווח בין אלמנטים מוטבעים מוצג, והסרתו עלולה להזיז את הפריסה.
לא. גם הייפוי וגם הכיווץ פועלים כולם בדפדפן שלכם, כך שהקוד שלכם לעולם אינו עוזב את המכשיר.
הטמע את הכלי הזה
הוסף את הכלי הזה לאתר שלך. העתק את קטע הקוד שלהלן; הוא מתעדכן אוטומטית.
<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>כלים קשורים
ייפוי וסידור של קוד JavaScript עם הזחה ורווחים עקביים. פועל כולו בדפדפן שלכם.
המירו CSV לקובץ Excel .xlsx ו-Excel בחזרה ל-CSV, כולו בדפדפן שלכם. עובד בשני הכיוונים.
צרו ממשקי TypeScript מדוגמת JSON, עם טיפוסים מקוננים, מערכים ושדות אופציונליים. פועל בדפדפן שלכם.
המירו JSON ל-XML ו-XML חזרה ל-JSON, בשני הכיוונים, הכול בתוך הדפדפן שלכם.