# HWP/HWPX  HTML/CSS 
                                                       硫\n\n> **紐⑹**: HWPX
                                                                                 臾몄
                                                                                      쨌ㅽ
由우
      異異곕 HWPX  HWP 蹂  \n> 肄 瑜 李몄“  留ㅽ
                                                                 .  \n> **異泥
湲怨쇱뺨⑦
           怨듭 臾몄
                      
                         **: HWP 5.0 諛
                                        由 

닿
    + HWPX XML 洹 + HTML/CSS 留ㅽ\n\n---\n\n## 0. 臾몄
                                                         怨
                                                             \n\n```\nHWP (諛
                                                                              由)          HWPX (XML)              HTML/CSS\n      \nCompound File       ZIP Archive             ⑥ FileHeader        META-INF/             <head>\n DocInfo              manifest.xml         <meta>\n  (湲瑗, ㅽ Contents/                <style>\n   
/諛곌꼍,         header.xml        <body>\n   湲⑥ )          (DocInfo )        ㅻ \n BodyText/            section0.xml         蹂몃Ц\n   Section0           (蹂몃Ц )           명
          \n BinData/             section1.xml      @page CSS\n          BinData/\n PrvImage               version.xml\n```\n\n**듭**: HWP 諛
                                                                    由ъ肄 援ъ“ HWPX XMLщ㉫몃 1:1 .  \n 듯 媛
닿
   瑜 湲곗쇰, CSS 蹂吏 곌껐.\n\n---\n\n## 1. ⑥
                                                         泥닿
                                                              \n\n### 1.1 HWPUNIT (湲 대 ⑥
                                                                                             )\n\nHWP 1/7200  湲곕낯 ⑥
                  濡 ъ⑺.\n\n| 蹂 | 怨듭 |\n|-----------|------|------|\n| HWPUNIT  mm | `hwpunit / 7200 * 25.4` | 7200  25.4mm (= 1 pt | `hwpunit / 7200 * 72` | 7200  72pt |\n| HWPUNIT  px (96dpi) | `hwpunit / 7200 * 96` | 7200  96px |\n| mm  HWPUNIT | `mm / 25.4 * 7200` | 25.4mm  7200 |\n| pt  HWPUNIT | `pt / 72 * 7200` | 10pt  1000 |\n\n```python\ndef hwpunit_to_mm(hwpunit):  return hwpunit / 7200 * 25.4\ndef hwpunit_to_pt(hwpunit):  return hwpunit / 7200 * 72\ndef hwpunit_to_px(hwpunit):  return hwpunit / 7200 * 96\ndef mm_to_hwpunit(mm):       return mm / 25.4 * 7200\n```\n\n### 1.2 湲ш린 (CharShape)\n\nHWPш린 HWPUNIT ⑥
                            留 100諛 ㅼ⑸ .\n\n| HWP 媛 | ㅼ ш린 | CSS |\n|--------|----------|-----|\n| 1000 | 10pt | `font-size: 10pt` |\n| 1200 | 12pt | `font-size: 12pt` |\n| 2400 | 24pt | `font-size: 24pt` |\n\n```python\ndef charsize_to_pt(hwp_size):  return hwp_size / 100  # 1000  10pt\n```\n\n### 1.3 COLORREF ()\n\nHWP 0x00BBGGRR   BGR). CSS #RRGGBB.\n\n| HWP COLORREF | 遺
                                                                                              | CSS |\n|-------------|------|-----|\n| 0x00000000 | R=0, G=0, B=0 | `#000000` (寃) |\n| 0x00FF0000 | R=0, G=0, B=255 | `#0000ff` () |\n| 0x0000FF00 | R=0, G=255, B=0 | `#00ff00` (珥濡) |\n| 0x00FFFFFF | R=255, G=255, B=255 | `#ffffff` () |\n\n```python\ndef colorref_to_css(colorref):\n    r = colorref & 0xFF\n    g = (colorref >> 8) & 0xFF\n    b = (colorref >> 16) & 0xFF\n    return f'#{r:02x}{g:02x}{b:02x}'\n```\n\n**HWPX XML
              **: `#RRGGBB` 쇰 吏 湲곕 (蹂
                                                   ).\n\n---\n\n## 2. 
/諛곌꼍 (BorderFill)\n\n> HWP: `HWPTAG_BORDER_FILL` (DocInfo 肄)  \n> HWPX: `<hh:borderFill>` (header.xml )  \n> ⑸
                  :  
, 臾몃, 履 
/諛곌꼍듯 \n\n### 2.1 
ъ
   醫
瑜 | 
       | HWPX type 
                      | CSS border-style |\n|-------                                                  --|------|---------------|-----------------|\n| 0 | ㅼ
                                                       | `SOLID` | `solid` |\n| 1 | 湲 
                                                                                           | `DASH` |  `dashed` |\n| 2 | 
                    | `DOT` | `dotted` |\n| 3 | -.-.-. | `DASH_DOT` | `dashed` (洹쇱) |\n| 4 | -..-..IRCLE` | `dotted` (洹쇱) |\n