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>3 <head>4 <style>5 .chroma{color:#f8f8f2;background-color:#2e3440}.chroma .err{color:#960050;background-color:#1e0010}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffc}.chroma .lnt{margin-right:.4em;padding:0 .4em;color:#7f7f7f}.chroma .ln{margin-right:.4em;padding:0 .4em;color:#7f7f7f}.chroma .k{color:#66d9ef}.chroma .kc{color:#66d9ef}.chroma .kd{color:#66d9ef}.chroma .kn{color:#f92672}.chroma .kp{color:#66d9ef}.chroma .kr{color:#66d9ef}.chroma .kt{color:#66d9ef}.chroma .na{color:#a6e22e}.chroma .nc{color:#a6e22e}.chroma .no{color:#66d9ef}.chroma .nd{color:#a6e22e}.chroma .ne{color:#a6e22e}.chroma .nf{color:#a6e22e}.chroma .nx{color:#a6e22e}.chroma .nt{color:#f92672}.chroma .l{color:#ae81ff}.chroma .ld{color:#e6db74}.chroma .s{color:#e6db74}.chroma .sa{color:#e6db74}.chroma .sb{color:#e6db74}.chroma .sc{color:#e6db74}.chroma .dl{color:#e6db74}.chroma .sd{color:#e6db74}.chroma .s2{color:#e6db74}.chroma .se{color:#ae81ff}.chroma .sh{color:#e6db74}.chroma .si{color:#e6db74}.chroma .sx{color:#e6db74}.chroma .sr{color:#e6db74}.chroma .s1{color:#e6db74}.chroma .ss{color:#e6db74}.chroma .m{color:#ae81ff}.chroma .mb{color:#ae81ff}.chroma .mf{color:#ae81ff}.chroma .mh{color:#ae81ff}.chroma .mi{color:#ae81ff}.chroma .il{color:#ae81ff}.chroma .mo{color:#ae81ff}.chroma .o{color:#f92672}.chroma .ow{color:#f92672}.chroma .c{color:#75715e}.chroma .ch{color:#75715e}.chroma .cm{color:#75715e}.chroma .c1{color:#75715e}.chroma .cs{color:#75715e}.chroma .cp{color:#75715e}.chroma .cpf{color:#75715e}.chroma .gd{color:#f92672}.chroma .ge{font-style:italic}.chroma .gi{color:#a6e22e}.chroma .gs{font-weight:700}.chroma .gu{color:#75715e}6 </style>7 <meta charset="utf-8">8 <meta content="width=device-width, initial-scale=1.0" name="viewport">9 <meta content="My notes about open source stuff." name="description">10 <style media="screen" type="text/css">11 *, *:before, *:after {12 box-sizing: border-box;13}14 15html {16 font-size: 62.5%;17}18 19body {20 font-size: 16px;21 font-size: 1.6rem;22 font-family: 'Helvetica Neue', 'Arial', sans-serif;23 color: #313a3d;24 width: 100%;25 margin: 0 auto;26 padding: 0 16px;27 line-height: 1.6;28}29 30header#banner {31 margin: 25px 0;32}33 34header#banner a {35 color: #313a3d;36 text-decoration: none;37}38 39header#banner a:hover {40 text-decoration: underline;41}42 43header#banner h2 {44 display: inline;45 font-size: 21px;46 font-size: 2.1rem;47 margin: 0 8px 0 0;48}49 50header#banner nav {51 display: inline-block;52}53 54header#banner nav ul {55 list-style-type: none;56 font-size: 1.05em;57 text-transform: lowercase;58 margin: 0;59 padding: 0;60}61 62header#banner nav ul li {63 display: inline;64 margin: 0 3px;65}66 67header#banner nav ul li a {68 color: #454545;69}70 71main#content a {72 color: #007dfa;73 text-decoration: none;74}75 76main#content a:hover {77 text-decoration: underline;78}79 80main#content p {81 color: #394548;82 margin: 16px 0;83}84 85main#content h1,86main#content h2,87main#content h3,88main#content h4,89main#content h5,90main#content h6 {91 margin-bottom: 0;92 line-height: 1.15;93}94 95main#content h1 + p,96main#content h2 + p,97main#content h3 + p,98main#content h4 + p,99main#content h5 + p,100main#content h6 + p {101 margin-top: 5px;102}103 104main#content h3 {105 font-size: 19px;106 font-size: 1.9rem;107}108 109/* index.html styles */110main#content ul#posts {111 list-style-type: none;112 font-size: 16px;113 font-size: 1.6rem;114 margin-top: 0;115 padding: 0;116}117 118main#content ul#posts li {119 margin: 5px 0;120 padding: 0;121}122 123main#content ul#posts small {124 font-size: 0.8em;125 color: #767676;126 margin-left: 10px;127}128 129main#content ul#posts li a {130 text-decoration: none;131}132 133main#content ul#posts li a:hover {134 color: #369aff;135}136 137main#content ul#posts li a:hover small {138 color: inherit;139}140 141/* single.html styles */142main#content header#post-header h1 {143 display: block;144 font-size: 23px;145 font-size: 2.3rem;146 line-height: 1.15;147}148 149main#content header#post-header time {150 display: block;151 font-size: 0.85em;152 color: #767676;153}154 155main#content img {156 max-width: 100%;157 margin: 0 auto;158}159 160main#content code,161main#content pre {162 font-family: 'Menlo', monospace;163}164 165main#content code {166 font-size: 0.96em;167 padding: 0 5px;168}169 170main#content pre {171 display: block;172 overflow-x: auto;173 font-size: 14px;174 font-size: 1.4rem;175 white-space: pre;176 margin: 20px 0;177 padding: 1.5rem 1.5rem;178 line-height: 1.4;179}180 181main#content pre code {182 padding: 0;183}184 185footer#footer {186 font-size: 14px;187 font-size: 1.4rem;188 font-weight: 300;189 color: #949494;190 margin: 40px 0;191}192 </style>193 <style media="screen" type="text/css">194 body {195 color: #ebebeb;196 background: #3b4252;197}198 199header#banner a {200 color: #e0e0e0;201 text-decoration: none;202}203 204header#banner nav ul li a {205 color: #cccccc;206}207 208main#content a {209 color: #88c0d0;210}211 212main#content p {213 color: #f5f5f5;214}215 216main#content ul#posts small {217 color: #a7a7a7;218}219 220main#content ul#posts li a:hover {221 color: #5e81ac;222}223 224main#content ul#posts li a:visited {225 color: #81a1c1;226}227 228main#content header#post-header time {229 color: #a7a7a7;230}231 </style>232 <style media="(min-width: 770px)" type="text/css">233 body {234 width: 900px;235 line-height: 1.5;236}237 238/* index.html styles */239header#banner h2 {240 font-size: 25px;241 font-size: 2.5rem;242}243 244main#content h3 {245 font-size: 20px;246 font-size: 2rem;247}248 249main#content ul#posts {250 font-size: 18px;251 font-size: 1.8rem;252}253 254/* single.html styles */255main#content header#post-header h1 {256 font-size: 26px;257 font-size: 2.6rem;258}259 260main#content img {261 max-width: 100%;262 margin-left: 0%;263}264 265main#content pre {266 width: 100%;267 margin-left: 0%;268 padding: 1.5rem 2.2rem;269}270 </style>271 <title>272 OpenLDAP, Evolution and Microsoft Outlook HOWTO273 </title>274 <style id="isso-style" type="text/css">275 #isso-thread * {276 -webkit-box-sizing: border-box;277 -moz-box-sizing: border-box;278 box-sizing: border-box;279}280#isso-thread .isso-comment-header a {281 text-decoration: none;282}283 284#isso-thread {285 padding: 0;286 margin: 0;287}288#isso-thread > h4 {289 color: #555;290 font-weight: bold;291}292#isso-thread > .isso-feedlink {293 float: right;294 padding-left: 1em;295}296#isso-thread > .isso-feedlink > a {297 font-size: 0.8em;298 vertical-align: bottom;299}300#isso-thread .textarea {301 min-height: 58px;302 outline: 0;303}304#isso-thread .textarea.placeholder {305 color: #757575;306}307 308#isso-root .isso-comment {309 max-width: 68em;310 padding-top: 0.95em;311 margin: 0.95em auto;312}313#isso-root .preview .isso-comment {314 padding-top: 0;315 margin: 0;316}317#isso-root .isso-comment:not(:first-of-type),318.isso-follow-up .isso-comment {319 border-top: 1px solid rgba(0, 0, 0, 0.1);320}321.isso-comment > div.avatar {322 display: block;323 float: left;324 width: 7%;325 margin: 3px 15px 0 0;326}327.isso-comment > div.avatar > svg {328 max-width: 48px;329 max-height: 48px;330 border: 1px solid rgba(0, 0, 0, 0.2);331 border-radius: 3px;332 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);333}334.isso-comment > div.text-wrapper {335 display: block;336}337.isso-comment .isso-follow-up {338 padding-left: calc(7% + 20px);339}340.isso-comment > div.text-wrapper > .isso-comment-header, .isso-comment > div.text-wrapper > .isso-comment-footer {341 font-size: 0.95em;342}343.isso-comment > div.text-wrapper > .isso-comment-header {344 font-size: 0.85em;345}346.isso-comment > div.text-wrapper > .isso-comment-header .spacer {347 padding: 0 6px;348}349.isso-comment > div.text-wrapper > .isso-comment-header .spacer,350.isso-comment > div.text-wrapper > .isso-comment-header a.permalink,351.isso-comment > div.text-wrapper > .isso-comment-header .note,352.isso-comment > div.text-wrapper > .isso-comment-header a.parent {353 color: gray !important;354 font-weight: normal;355 text-shadow: none !important;356}357.isso-comment > div.text-wrapper > .isso-comment-header .spacer:hover,358.isso-comment > div.text-wrapper > .isso-comment-header a.permalink:hover,359.isso-comment > div.text-wrapper > .isso-comment-header .note:hover,360.isso-comment > div.text-wrapper > .isso-comment-header a.parent:hover {361 color: #606060 !important;362}363.isso-comment > div.text-wrapper > .isso-comment-header .note {364 float: right;365}366.isso-comment > div.text-wrapper > .isso-comment-header .author {367 font-weight: bold;368 color: #555;369}370.isso-comment > div.text-wrapper > .textarea-wrapper .textarea,371.isso-comment > div.text-wrapper > .textarea-wrapper .preview {372 margin-top: 0.2em;373}374.isso-comment > div.text-wrapper > div.text p {375 margin-top: 0.2em;376}377.isso-comment > div.text-wrapper > div.text p:last-child {378 margin-bottom: 0.2em;379}380.isso-comment > div.text-wrapper > div.text h1,381.isso-comment > div.text-wrapper > div.text h2,382.isso-comment > div.text-wrapper > div.text h3,383.isso-comment > div.text-wrapper > div.text h4,384.isso-comment > div.text-wrapper > div.text h5,385.isso-comment > div.text-wrapper > div.text h6 {386 font-size: 130%;387 font-weight: bold;388}389.isso-comment > div.text-wrapper > div.textarea-wrapper .textarea,390.isso-comment > div.text-wrapper > div.textarea-wrapper .preview {391 width: 100%;392 border: 1px solid #f0f0f0;393 border-radius: 2px;394 box-shadow: 0 0 2px #888;395}396.isso-comment > div.text-wrapper > .isso-comment-footer {397 font-size: 0.80em;398 color: gray !important;399 clear: left;400}401.isso-feedlink,402.isso-comment > div.text-wrapper > .isso-comment-footer a {403 font-weight: bold;404 text-decoration: none;405}406.isso-feedlink:hover,407.isso-comment > div.text-wrapper > .isso-comment-footer a:hover {408 color: #111111 !important;409 text-shadow: #aaaaaa 0 0 1px !important;410}411.isso-comment > div.text-wrapper > .isso-comment-footer > a {412 position: relative;413 top: .2em;414}415.isso-comment > div.text-wrapper > .isso-comment-footer > a + a {416 padding-left: 1em;417}418.isso-comment > div.text-wrapper > .isso-comment-footer .votes {419 color: gray;420}421.isso-comment > div.text-wrapper > .isso-comment-footer .upvote svg,422.isso-comment > div.text-wrapper > .isso-comment-footer .downvote svg {423 position: relative;424 top: .2em;425}426.isso-comment .isso-postbox {427 margin-top: 0.8em;428}429.isso-comment.isso-no-votes > * > .isso-comment-footer span.votes {430 display: none;431}432 433.isso-postbox {434 max-width: 68em;435 margin: 0 auto 2em;436 clear: right;437}438.isso-postbox > .form-wrapper {439 display: block;440 padding: 0;441}442.isso-postbox > .form-wrapper > .auth-section,443.isso-postbox > .form-wrapper > .auth-section .post-action {444 display: block;445}446.isso-postbox > .form-wrapper .textarea,447.isso-postbox > .form-wrapper .preview {448 margin: 0 0 .3em;449 padding: .4em .8em;450 border-radius: 3px;451 background-color: #fff;452 border: 1px solid rgba(0, 0, 0, 0.2);453 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);454}455.isso-postbox > .form-wrapper input[type=checkbox] {456 vertical-align: middle;457 position: relative;458 bottom: 1px;459 margin-left: 0;460}461.isso-postbox > .form-wrapper .notification-section {462 font-size: 0.90em;463 padding-top: .3em;464}465#isso-thread .textarea:focus,466#isso-thread input:focus {467 border-color: rgba(0, 0, 0, 0.8);468}469.isso-postbox > .form-wrapper > .auth-section .input-wrapper {470 display: inline-block;471 position: relative;472 max-width: 25%;473 margin: 0;474}475.isso-postbox > .form-wrapper > .auth-section .input-wrapper input {476 padding: .3em 10px;477 max-width: 100%;478 border-radius: 3px;479 background-color: #fff;480 line-height: 1.4em;481 border: 1px solid rgba(0, 0, 0, 0.2);482 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);483}484.isso-postbox > .form-wrapper > .auth-section .post-action {485 display: inline-block;486 float: right;487 margin: 0 0 0 5px;488}489.isso-postbox > .form-wrapper > .auth-section .post-action > input {490 padding: calc(.3em - 1px);491 border-radius: 2px;492 border: 1px solid #CCC;493 background-color: #DDD;494 cursor: pointer;495 outline: 0;496 line-height: 1.4em;497 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);498}499.isso-postbox > .form-wrapper > .auth-section .post-action > input:hover {500 background-color: #CCC;501}502.isso-postbox > .form-wrapper > .auth-section .post-action > input:active {503 background-color: #BBB;504}505.isso-postbox > .form-wrapper .preview,506.isso-postbox > .form-wrapper input[name="edit"],507.isso-postbox.preview-mode > .form-wrapper input[name="preview"],508.isso-postbox.preview-mode > .form-wrapper .textarea {509 display: none;510}511.isso-postbox.preview-mode > .form-wrapper .preview {512 display: block;513}514.isso-postbox.preview-mode > .form-wrapper input[name="edit"] {515 display: inline;516}517.isso-postbox > .form-wrapper .preview {518 background-color: #f8f8f8;519 background: repeating-linear-gradient(520 -45deg,521 #f8f8f8,522 #f8f8f8 10px,523 #fff 10px,524 #fff 20px525 );526}527.isso-postbox > .form-wrapper > .notification-section {528 display: none;529 padding-bottom: 10px;530}531@media screen and (max-width:600px) {532 .isso-postbox > .form-wrapper > .auth-section .input-wrapper {533 display: block;534 max-width: 100%;535 margin: 0 0 .3em;536 }537 .isso-postbox > .form-wrapper > .auth-section .input-wrapper input {538 width: 100%;539 }540}541 </style>542 </head>543 <body>544 <header id="banner">545 <h2>546 <a>547 Sebastien Wains548 </a>549 </h2>550 <nav>551 <ul>552 <li>553 <a>554 posts555 </a>556 </li>557 <li>558 <a title="Search">559 Search560 </a>561 </li>562 <li>563 <a title="Subscribe">564 Subscribe565 </a>566 </li>567 <li>568 <a title="Contact">569 Contact570 </a>571 </li>572 </ul>573 </nav>574 </header>575 <main id="content">576 <article>577 <header id="post-header">578 <h1>579 OpenLDAP, Evolution and Microsoft Outlook HOWTO580 </h1>581 <time>582 December 17, 2006583 </time>584 </header>585 <p>586 categories:587 </p>588 <ul>589 <li>590 Howto591 </li>592 <li>593 LDAP594 </li>595 <li>596 Linux597 </li>598 </ul>599 <p>600 Matthew Feldt was kind enough to put up a guide explaining how to set up OpenLDAP as an addressbook compatible with Evolution and Microsoft Outlook.601 </p>602 <p>603 Please visit his page here :604 <a>605 http://www.feldt.com/work/projects/openLDAP/606 </a>607 </p>608 <p>609 A mirror of his page is available here :610 <a>611 http://blog.wains.be/mirrors/feldt.com/612 </a>613 </p>614 <p>615 The guide works for CentOS/RHEL 4.4.616 </p>617 <p>618 Thanks Matthew for that very well written howto !619 </p>620 <p>621 For your information, LDAP support in Outlook is terrible. No autocompletion available.. pretty much like IMAP support.. “terrible on purpose” (tm)622 </p>623 </article>624 <br>625 <br>626 <hr>627 <h3>628 Thanks for reading this post!629 </h3>630 <br>631 Did you find an issue in this article?632 <br>633 <br>634 - click on the following635 <a target="_blank">636 Github link637 </a>638 <br>639 - log into Github with your account640 <br>641 - click on the line number containing the error642 <br>643 - click on the "..." button644 <br>645 - choose "Reference in new issue"646 <br>647 - add a title and your comment648 <br>649 - click "Submit new issue"650 <br>651 <br>652 Your feedback is much appreciated! 🤜🏼🤛🏼653 <br>654 <br>655 You can also drop me a line below!656 <section id="isso-thread">657 <h4>658 </h4>659 <div class="isso-postbox">660 <div class="form-wrapper">661 <div class="textarea-wrapper">662 <div class="textarea placeholder" contenteditable="true">663 Type Comment Here (at least 3 chars)664 </div>665 <div class="preview">666 <div class="isso-comment">667 <div class="text-wrapper">668 <div class="text">669 </div>670 </div>671 </div>672 </div>673 </div>674 <section class="auth-section">675 <p class="input-wrapper">676 <input name="author" placeholder="Name" type="text" value>677 </p>678 <p class="input-wrapper">679 <input name="email" placeholder="E-mail" type="email" value>680 </p>681 <p class="input-wrapper">682 <input name="website" placeholder="Website (optional)" type="text" value>683 </p>684 <p class="post-action">685 <input type="submit" value="Submit">686 </p>687 <p class="post-action">688 <input name="preview" type="button" value="Preview">689 </p>690 <p class="post-action">691 <input name="edit" type="button" value="Edit">692 </p>693 </section>694 <section class="notification-section" style="display: none;">695 <label>696 <input name="notification" type="checkbox">697 Subscribe to email notification of replies698 </label>699 </section>700 </div>701 </div>702 <div id="isso-root">703 </div>704 </section>705 </main>706 <footer id="footer">707 Copyright © Sebastien Wains708 </footer>709 </body>710</html>711 