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.
221.8k
1<!DOCTYPE html>2<html lang="en">3 <head>4 <style>5 blockquote,body,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,ol,p,pre,ul{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:#fdfdfd;-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}.highlight,blockquote,dl,figure,h1,h2,h3,h4,h5,h6,ol,p,pre,ul{margin-bottom:15px}main{display:block}img{max-width:100%;vertical-align:middle}figure>img{display:block}figcaption{font-size:14px}ol,ul{margin-left:30px}li>ol,li>ul{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:#828282;border-left:4px solid #e8e8e8;padding-left:15px;font-size:18px;letter-spacing:-1px;font-style:italic}blockquote>:last-child{margin-bottom:0}code,pre{font-size:15px;border:1px solid #e8e8e8;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}}.footer-col-wrapper:after,.wrapper:after{content:"";display:table;clear:both}.svg-icon{width:16px;height:16px;display:inline-block;fill:#828282;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 #e8e8e8}table tr:nth-child(even){background-color:#f7f7f7}table td,table th{padding:10px 15px}table th{background-color:#f0f0f0;border:1px solid #dedede;border-bottom-color:#c9c9c9}table td{border:1px solid #e8e8e8}.site-header{border-top:5px solid #424242;border-bottom:1px solid #e8e8e8;min-height:55.95px;position:relative}.site-title{font-size:26px;font-weight:300;line-height:54px;letter-spacing:-1px;margin-bottom:0;float:left}.site-title,.site-title:visited{color:#424242}.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:#fdfdfd;border:1px solid #e8e8e8;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:#424242}.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 #e8e8e8;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:#828282;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))}@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:#828282}.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}.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}}.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:700}.highlight .o{font-weight:700}.highlight .cm{color:#998;font-style:italic}.highlight .cp{color:#999;font-weight:700}.highlight .c1{color:#998;font-style:italic}.highlight .cs{color:#999;font-weight:700;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:700}.highlight .gu{color:#aaa}.highlight .gt{color:#a00}.highlight .kc{font-weight:700}.highlight .kd{font-weight:700}.highlight .kp{font-weight:700}.highlight .kr{font-weight:700}.highlight .kt{color:#458;font-weight:700}.highlight .m{color:#099}.highlight .s{color:#d14}.highlight .na{color:teal}.highlight .nb{color:#0086b3}.highlight .nc{color:#458;font-weight:700}.highlight .no{color:teal}.highlight .ni{color:purple}.highlight .ne{color:#900;font-weight:700}.highlight .nf{color:#900;font-weight:700}.highlight .nn{color:#555}.highlight .nt{color:navy}.highlight .nv{color:teal}.highlight .ow{font-weight:700}.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 ESPN Employee on Reddit | Backseat Fan13 </title>14 <meta content="Jekyll v4.3.0" name="generator">15 <meta content="ESPN Employee on Reddit" property="og:title">16 <meta content="Ryan M." name="author">17 <meta content="en_US" property="og:locale">18 <meta content="I stumbled across this yesterday on reddit, and I found it kind of interesting. Reddit is kind of like digg, but it doesn't always have to be stories. I don't use it that often, but feel free to reddit us or digg us :)." name="description">19 <meta content="I stumbled across this yesterday on reddit, and I found it kind of interesting. Reddit is kind of like digg, but it doesn't always have to be stories. I don't use it that often, but feel free to reddit us or digg us :)." property="og:description">20 <meta content="" property="og:url">21 <meta content="Backseat Fan" property="og:site_name">22 <meta content="article" property="og:type">23 <meta content="2010-02-16T07:11:16+00:00" property="article:published_time">24 <meta content="summary" name="twitter:card">25 <meta content="ESPN Employee on Reddit" 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 Backseat Fan33 </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 <a class="page-link">42 About Us43 </a>44 <a class="page-link">45 Betting On Sports – Tips For Winners46 </a>47 <a class="page-link">48 Contact Us49 </a>50 </div>51 </nav>52 </div>53 </header>54 <main aria-label="Content" class="page-content">55 <div class="wrapper">56 <article class="post h-entry" itemscope itemtype="">57 <header class="post-header">58 <h1 class="post-title p-name" itemprop="name headline">59 ESPN Employee on Reddit60 </h1>61 <p class="post-meta">62 <time class="dt-published" datetime="2010-02-16T07:11:16+00:00" itemprop="datePublished">63 Feb 16, 201064 </time>65 •66 <span itemprop="author" itemscope itemtype="">67 <span class="p-author h-card" itemprop="name">68 Ryan M.69 </span>70 </span>71 </p>72 </header>73 <div class="post-content e-content" itemprop="articleBody">74 <div class="entry">75 <p>76 I stumbled across this yesterday on reddit, and I found it kind of interesting. Reddit is kind of like digg, but it doesn't always have to be stories.77 </p>78 <p>79 An Employee from ESPN decided to do a tell all on reddit, and it is pretty funny. Follow the link,80 <a>81 I work for ESPN AMA82 </a>83 .84 </p>85 <p>86 In short, he talks a lot about different employees and he can do this, because reddit is pretty much anonymous. Wonder if it is on the list of social networking sites that ESPN employees can't go on.87 </p>88 </div>89 </div>90 <a class="u-url" hidden>91 </a>92 </article>93 </div>94 </main>95 <footer class="site-footer h-card">96 <data class="u-url">97 </data>98 <div class="wrapper">99 <h2 class="footer-heading">100 Backseat Fan101 </h2>102 <div class="footer-col-wrapper">103 <div class="footer-col footer-col-1">104 <ul class="contact-list">105 <li class="p-name">106 Backseat Fan107 </li>108 <li>109 <a class="u-email">110 [EMAIL REDACTED]111 </a>112 </li>113 </ul>114 </div>115 <div class="footer-col footer-col-2">116 <ul class="social-media-list">117 <li>118 <a>119 <span class="username">120 mrbusche121 </span>122 </a>123 </li>124 <li>125 <a>126 <span class="username">127 backseatfan128 </span>129 </a>130 </li>131 </ul>132 </div>133 <div class="footer-col footer-col-3">134 <p>135 </p>136 </div>137 </div>138 </div>139 </footer>140 </body>141</html>142 