Team Ai
Datasetpublic

SALT-NLP/Design2Code

This dataset consists of 484 webpages from the C4 validation set, serving the purpose of testing multimodal LLMs on converting visual designs into code implementations. Each example is a pair of source HTML and screenshot ({id}.html and {id}.png). See the dataset in the huggingface format here. Note that all images in these webpages are replaced by a placeholder image (rick.jpg) Please refer to our project page and our paper for more information. Example Usage For example, you… See the full description on the dataset page: https://huggingface.co/datasets/SALT-NLP/Design2Code.

sourceHugging Faceodc-byupdated 3y agoView on Hugging Face
22likes2.8kdownloads
14854.html98 linesDownload Raw Back to root
1<!DOCTYPE html>2<html lang="en">3 <head>4  <style>5   @font-face{font-family:Typewriter;src:url(/assets/fonts/MyUnderwood.ttf)}body,h1,h2,h3,h4,h5,h6,p,blockquote,pre,hr,dl,dd,ol,ul,figure{margin:0;padding:0}body{font:400 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";color:#111;background-color:#d6cca9;-webkit-text-size-adjust:100%;-webkit-font-feature-settings:"kern" 1;-moz-font-feature-settings:"kern" 1;-o-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1;font-kerning:normal;display:flex;min-height:100vh;flex-direction:column}h1,h2,h3,h4,h5,h6,p,blockquote,pre,ul,ol,dl,figure,.highlight{margin-bottom:15px}main{display:block}img{max-width:100%;vertical-align:middle}figure>img{display:block}figcaption{font-size:14px}ul,ol{margin-left:30px}li>ul,li>ol{margin-bottom:0}h1,h2,h3,h4,h5,h6{font-weight:400}a{color:#2a7ae2;text-decoration:none}a:visited{color:#1756a9}a:hover{color:#111;text-decoration:underline}.social-media-list a:hover{text-decoration:none}.social-media-list a:hover .username{text-decoration:underline}blockquote{color:#504e4e;border-left:4px solid #b6b4b4;padding-left:15px;font-size:18px;letter-spacing:-1px;font-style:italic}blockquote>:last-child{margin-bottom:0}pre,code{font-size:15px;border:1px solid #b6b4b4;border-radius:3px;background-color:#eef}code{padding:1px 5px}pre{padding:8px 12px;overflow-x:auto}pre>code{border:0;padding-right:0;padding-left:0}.wrapper{max-width:-webkit-calc(800px - (30px * 2));max-width:calc(800px - (30px * 2));margin-right:auto;margin-left:auto;padding-right:30px;padding-left:30px}@media screen and (max-width: 800px){.wrapper{max-width:-webkit-calc(800px - (30px));max-width:calc(800px - (30px));padding-right:15px;padding-left:15px}}.wrapper:after,.footer-col-wrapper:after{content:"";display:table;clear:both}.svg-icon{width:16px;height:16px;display:inline-block;fill:#504e4e;padding-right:5px;vertical-align:text-top}.social-media-list li+li{padding-top:5px}table{margin-bottom:30px;width:100%;text-align:left;color:#3f3f3f;border-collapse:collapse;border:1px solid #b6b4b4}table tr:nth-child(even){background-color:#c5c4c4}table th,table td{padding:10px 15px}table th{background-color:#bdbcbc;border:1px solid #acaaaa;border-bottom-color:#989595}table td{border:1px solid #b6b4b4}.site-header{border-top:5px solid #0f0f0f;min-height:55.95px;position:relative}.site-title{font-size:32px;font-weight:300;font-family:"Typewriter";line-height:54px;letter-spacing:-1px;margin-bottom:0;float:left}.site-title,.site-title:visited{color:#0f0f0f}.site-nav{float:right;line-height:54px}.site-nav .nav-trigger{display:none}.site-nav .menu-icon{display:none}.site-nav .page-link{color:#111;line-height:1.5}.site-nav .page-link:not(:last-child){margin-right:20px}@media screen and (max-width: 600px){.site-nav{position:absolute;top:9px;right:15px;background-color:#d6cca9;border:1px solid #b6b4b4;border-radius:5px;text-align:right}.site-nav label[for="nav-trigger"]{display:block;float:right;width:36px;height:36px;z-index:2;cursor:pointer}.site-nav .menu-icon{display:block;float:right;width:36px;height:26px;line-height:0;padding-top:10px;text-align:center}.site-nav .menu-icon>svg{fill:#0f0f0f}.site-nav input ~ .trigger{clear:both;display:none}.site-nav input:checked ~ .trigger{display:block;padding-bottom:5px}.site-nav .page-link{display:block;padding:5px 10px;margin-left:20px}.site-nav .page-link:not(:last-child){margin-right:0}}.site-footer{border-top:1px solid #b6b4b4;padding:30px 0}.footer-heading{font-size:18px;margin-bottom:15px}.contact-list,.social-media-list{list-style:none;margin-left:0}.footer-col-wrapper{font-size:15px;color:#504e4e;margin-left:-15px}.footer-col{float:left;margin-bottom:15px;padding-left:15px}.footer-col-1{width:-webkit-calc(35% - (30px / 2));width:calc(35% - (30px / 2))}.footer-col-2{width:-webkit-calc(20% - (30px / 2));width:calc(20% - (30px / 2))}.footer-col-3{width:-webkit-calc(45% - (30px / 2));width:calc(45% - (30px / 2))}.footer-email{color:#504e4e}@media screen and (max-width: 800px){.footer-col-1,.footer-col-2{width:-webkit-calc(50% - (30px / 2));width:calc(50% - (30px / 2))}.footer-col-3{width:-webkit-calc(100% - (30px / 2));width:calc(100% - (30px / 2))}}@media screen and (max-width: 600px){.footer-col{float:none;width:-webkit-calc(100% - (30px / 2));width:calc(100% - (30px / 2))}}.page-content{padding:30px 0;flex:1}.page-heading{font-size:32px}.post-list-heading{font-size:28px}.post-list{margin-left:0;list-style:none}.post-list>li{margin-bottom:30px}.post-meta{font-size:14px;color:#504e4e}.post-link{display:block;font-size:24px}.post-header{margin-bottom:30px}.post-title{font-size:42px;letter-spacing:-1px;line-height:1}@media screen and (max-width: 800px){.post-title{font-size:36px}}.post-content{margin-bottom:30px;font-family:"Typewriter";font-size:28px}.post-content h2{font-size:32px}@media screen and (max-width: 800px){.post-content h2{font-size:28px}}.post-content h3{font-size:26px}@media screen and (max-width: 800px){.post-content h3{font-size:22px}}.post-content h4{font-size:20px}@media screen and (max-width: 800px){.post-content h4{font-size:18px}}.page-navigation{font-size:18px;display:block;width:auto;overflow:hidden;text-align:center}.page-navigation .prev{float:left;color:black}.page-navigation .next{float:right;color:black}.page-navigation .random{color:black}.redirect{font-size:24px}.highlight{background:#fff}.highlighter-rouge .highlight{background:#eef}.highlight .c{color:#998;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{font-weight:bold}.highlight .o{font-weight:bold}.highlight .cm{color:#998;font-style:italic}.highlight .cp{color:#999;font-weight:bold}.highlight .c1{color:#998;font-style:italic}.highlight .cs{color:#999;font-weight:bold;font-style:italic}.highlight .gd{color:#000;background-color:#fdd}.highlight .gd .x{color:#000;background-color:#faa}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .gi .x{color:#000;background-color:#afa}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaa}.highlight .gt{color:#a00}.highlight .kc{font-weight:bold}.highlight .kd{font-weight:bold}.highlight .kp{font-weight:bold}.highlight .kr{font-weight:bold}.highlight .kt{color:#458;font-weight:bold}.highlight .m{color:#099}.highlight .s{color:#d14}.highlight .na{color:teal}.highlight .nb{color:#0086B3}.highlight .nc{color:#458;font-weight:bold}.highlight .no{color:teal}.highlight .ni{color:purple}.highlight .ne{color:#900;font-weight:bold}.highlight .nf{color:#900;font-weight:bold}.highlight .nn{color:#555}.highlight .nt{color:navy}.highlight .nv{color:teal}.highlight .ow{font-weight:bold}.highlight .w{color:#bbb}.highlight .mf{color:#099}.highlight .mh{color:#099}.highlight .mi{color:#099}.highlight .mo{color:#099}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999}.highlight .vc{color:teal}.highlight .vg{color:teal}.highlight .vi{color:teal}.highlight .il{color:#099}6  </style>7  <meta charset="utf-8">8  <meta content="IE=edge" http-equiv="X-UA-Compatible">9  <meta content="width=device-width, initial-scale=1" name="viewport">10  <!-- Begin Jekyll SEO tag v2.8.0 -->11  <title>12   Gift bags | Mildly Clever13  </title>14  <meta content="Jekyll v3.9.0" name="generator">15  <meta content="Gift bags" property="og:title">16  <meta content="Tony Mann" name="author">17  <meta content="en_US" property="og:locale">18  <meta content="I would like to shake the hand of the person who invented the gift bag. They really hated wrapping presents. I usually just put a rock in one and pretend its a paperweight." name="description">19  <meta content="I would like to shake the hand of the person who invented the gift bag. They really hated wrapping presents. I usually just put a rock in one and pretend its a paperweight." property="og:description">20  <meta content="" property="og:url">21  <meta content="Mildly Clever" property="og:site_name">22  <meta content="article" property="og:type">23  <meta content="2018-01-07T00:00:00+00:00" property="article:published_time">24  <meta content="summary" name="twitter:card">25  <meta content="Gift bags" property="twitter:title">26  <!-- End Jekyll SEO tag -->27 </head>28 <body>29  <header class="site-header" role="banner">30   <div class="wrapper">31    <a class="site-title" rel="author">32     Mildly Clever33    </a>34    <nav class="site-nav">35     <input class="nav-trigger" id="nav-trigger" type="checkbox">36     <label for="nav-trigger">37      <span class="menu-icon">38      </span>39     </label>40     <div class="trigger">41     </div>42    </nav>43   </div>44  </header>45  <main aria-label="Content" class="page-content">46   <div class="wrapper">47    <article class="post h-entry" itemscope itemtype="">48     <!-- <header class="post-header">49    <h1 class="post-title p-name" itemprop="name headline">Gift bags</h1>50  </header> -->51     <div class="post-content e-content" itemprop="articleBody">52      <p>53       I would like to shake the hand of the person who invented the gift bag. They really hated wrapping presents.54      </p>55     </div>56     <div class="page-navigation">57      <a class="prev">58       &laquo; Previous59      </a>60      <a class="random">61       Random62      </a>63      <a class="next">64       Next &raquo;65      </a>66     </div>67     <a class="u-url" hidden>68     </a>69    </article>70   </div>71  </main>72  <footer class="site-footer h-card">73   <data class="u-url">74   </data>75   <div class="wrapper">76    <div class="footer-col-wrapper">77     <div class="footer-col footer-col-1">78      <ul class="contact-list">79       <li class="p-name">80        Tony Mann81       </li>82       <li>83        <a class="u-email footer-email">84         [EMAIL REDACTED]85        </a>86       </li>87      </ul>88     </div>89     <div class="footer-col footer-col-2">90      <ul class="social-media-list">91      </ul>92     </div>93    </div>94   </div>95  </footer>96 </body>97</html>98