html, body, h1, input, select { font-family:arial,sans-serif } body, h1 { font-size:14px; } h1 { font-weight:normal; margin:0; padding:0 } h3 { font-weight:normal; margin:0; padding:0; font-size:20px; line-height:1.3 } body { margin:0; background:#fff; color:#202124; } a { color:#1a0dab; text-decoration:none; -webkit-tap-highlight-color:rgba(0,0,0,.1) } a:visited { color:#681da8 } a:hover { text-decoration:underline } a:hover h3 { text-decoration:underline } a.a-no-hover-decoration:hover, a.a-no-hover-decoration:hover h3 { text-decoration:none } cite, cite a:link, cite a:visited { color:#4d5156; font-style:normal } button { margin:0 } ol li { list-style:none } ol, ul, li { margin:0; padding:0 } input { font-size:14px } input:focus { outline:none } input::-moz-focus-inner { border:0 } em { font-weight:bold; font-style:normal } .aCOpRe em, .yXK7lf em { color:#5f6368; } .aCOpRe a em { color:inherit } @-webkit-keyframes qs-timer { 0% { } } .z1asCe { display:inline-block; fill:currentColor; height:24px; line-height:24px; position:relative; width:24px } .z1asCe svg { display:block; height:100%; width:100% } :root { } .ynAwRc { color:#1a0dab } a:visited .ynAwRc, a:visited.ynAwRc { color:#681da8; } .JIFdL { color:#1a0dab } .zIamNc { color:#202124; font-family:arial,sans-serif; font-size:12px; font-weight:400; line-height:20px } .NUnG9d { color:#202124; font-family:arial,sans-serif; font-size:12px; font-weight:400; line-height:16px } .kqEaA { color:#70757a; font-family:arial,sans-serif; font-size:14px; font-weight:400; line-height:22px } .vJtJab { color:#1a0dab; font-family:arial,sans-serif; font-size:14px; font-weight:400; line-height:22px } .hWgrdb { font-style:italic } .Z5bgrc { font-family:arial,sans-serif-medium,sans-serif; font-weight:500 } .l97dzf { font-weight:400 } .N8MDs { font-family:arial,sans-serif-light,sans-serif } .z8gr9e { color:#4d5156 } .KHW3x { color:#fff } .ZYHQ7e { color:#70757a } .x2sBq { color:#b3261e } .tGXccd { color:#146c2e } .OvuNCb { color:#b06000 } .yNSCTe { color:#202124 } .XEI2lf { color:#fff } .u2fAP { color:#1f1f1f } .Q7PwXb { text-decoration:none } .NyOyWb { text-overflow:clip; overflow:hidden } .U2GSdd { height:calc(16px*2); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:normal } .GnYZ5c { height:calc(16px*3); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; white-space:normal } .potOpf { max-height:calc(24px*2); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:normal } .n4krj { height:calc(22px*2); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:normal } .NnEaBd { text-align:right } .xLQxIf { text-transform:capitalize } .uKdaQe { text-transform:lowercase } .MUmB9 { text-transform:none } .iUh30 { font-size:12px; line-height:1.3 } .f { color:#70757a; line-height:1.58 } .g { font-family:arial,sans-serif; font-size:14px; } .g { line-height:1.58; text-align:left } .g { width:600px; margin-top:0; margin-bottom:30px; } .iUh30 { padding-top:1px; } .vk_arc { border-top:1px solid #dadce0; cursor:pointer; height:0; margin-bottom:-19px; overflow:hidden; padding:20px 0; text-align:center } .vk_ard { top:-11px } .vk_aru { bottom:-6px } .vk_ard, .vk_aru { background-color:#ebebeb; margin-left:auto; margin-right:auto; position:relative; height:6px; width:64px } .vk_ard:after, .vk_ard:before, .vk_aru:after, .vk_aru:before { content:' '; height:0; left:0; position:absolute; width:0; border-left:32px solid rgba(255,255,255,0); border-right:32px solid rgba(255,255,255,0) } .vk_ard:before { border-top:16px solid #ebebeb; top:6px } .vk_aru:before { border-bottom:16px solid #ebebeb; bottom:6px } .vk_ard:after { top:0; border-top:16px solid #fff } .vk_aru:after { bottom:0; border-bottom:16px solid #fff } .jC7Epd.vk_ard, .jC7Epd.vk_aru { background-color:#202124 } .jC7Epd.vk_ard:before { border-top-color:#202124 } .jC7Epd.vk_aru:before { border-bottom-color:#202124 } .xpdclps, .xpdxpnd { overflow:hidden } .xpdclps, .xpdxpnd { transition:max-height 0.3s } .xpdxpnd, .xpdopen .xpdclps, .xpdopen .xpdxpnd.xpdnoxpnd { max-height:0 } .xpdopen .xpdxpnd { max-height:none } .xpdopen .xpdbox .xpdxpnd, .xpdopen .xpdbox.xpdopen .xpdclps { max-height:0 } .xpdopen .xpdbox.xpdopen .xpdxpnd, .xpdopen .xpdbox .xpdclps { max-height:none } .xpdclose .k5nfEc { display:none } .fp-i .SzDvzc { display:none } .fp-f { bottom:0; height:auto; left:0; position:fixed !important; right:0; top:0; width:auto; z-index:127 } .fp-h:not(.fp-nh):not(.goog-modalpopup-bg):not(.goog-modalpopup) { display:none !important } .fp-zh.fp-h:not(.fp-nh):not(.goog-modalpopup-bg):not(.goog-modalpopup) { display:block !important; height:0; overflow:hidden; transform:translate3d(0,0,0); transform:translate3d(0,0,0) } .fp-i .fp-c { display:block; min-height:100vh } li.fp-c { list-style:none } .fp-w { box-sizing:border-box; left:0; margin-left:auto; margin-right:auto; max-width:1217px; right:0 } .ellip { overflow:hidden; text-overflow:ellipsis; white-space:nowrap } html:not(.zAoYTe) [tabindex], html:not(.zAoYTe) [href], html:not(.zAoYTe) button, html:not(.zAoYTe) iframe, html:not(.zAoYTe) input, html:not(.zAoYTe) select, html:not(.zAoYTe) textarea, html:not(.zAoYTe) .F0azHf { outline:0 } .tF2Cxc { position:relative } .Jb0Zif .BDNLRc { margin:16px 16px -11px } .RUXr2d { display:inline } .MTB56 { margin-right:12px; vertical-align:middle } .Pthbuf { display:flex; align-items:center } .m164Nd { vertical-align:middle; display:inline-block } .qpGQpf { clear:both; padding-top:6px } .tcPEUc .MTB56 { display:none } .aCOpRe { line-height:1.58; word-wrap:break-word } .aCOpRe sup { line-height:0.9 } .yuRUbf { font-weight:normal; font-size:small; line-height:1.58; } .IsZvec { max-width:48em; color:#4d5156; line-height:1.58 } .uo4vr { color:#70757a; line-height:1.58 } .IjZ7ze { display:inline-block; color:#70757a; font-size:12px; line-height:1.34; white-space:nowrap } .FyYA1e { margin:5px 0 } .P1usbc { display:table; white-space:nowrap; margin:5px 0; line-height:1.58; color:#70757a; } .G1Rrjc { display:table-cell; padding-left:15px; vertical-align:baseline } .i4vd5e { display:table-cell } .VNLkW { display:table-row; vertical-align:top } .h7mcFf { color:#70757a } .k6DEPe { display:table-row; width:100% } .TXwUJf { color:#70757a } .PcHvNb { position:absolute } .N3nEGc { background-color:#fff; float:left; margin-top:4px } .wEQKyf.N3nEGc { float:right; margin:7px 0 5px 12px } .wEQKyf.Ik9SRc.N3nEGc { margin:2px 0 0 0 } .Ixi80c { margin-top:0 } .i0PvJb { background-color:#000 } .mWTy7c { border-top-left-radius:2px; bottom:0; font-size:11px; padding:1px 3px; position:absolute; right:0; background-color:rgba(0,0,0,.7); color:#fff } .rGhul { display:block; position:relative; overflow:hidden } .rGhul:focus { outline-style:solid; outline-width:2px } .vYWbhc { margin-top:0 } .TbwUpd a.fl { font-size:12px } .TQc1id .qLRx3b { font-size:14px; line-height:1.58 } .TbwUpd { display:inline-block; padding-bottom:2px; padding-top:1px; -webkit-text-size-adjust:none } .NJjxre { position:absolute; left:0; top:0 } .M8OgIe .VWCdhc.Mjve0e .TbwUpd { width:max-content } #rhs { position:relative; margin-left:var(--rhs-margin); flex:0 auto; width:var(--rhs-width); padding-bottom:15px; transition:opacity 0.3s } #rhs .scrt.VjDLd, #rhs table.VjDLd { border:0 } #rhs .VjDLd { border:1px solid #f8f9fa; padding-left:17px; padding-right:16px; position:relative; box-sizing:border-box } .s6JM6d .SwlyWb { display:none } #rhs.rhstc4 .VjDLd { width:var(--rhs-width); } #rhs.rhstc5 .VjDLd { width:457px } .rhstc4 .nmrhhd { background:none !important; display:none !important } .rhstc5 .SwlyWb { background:none !important; display:none !important } .dURPMd { margin-top:6px } .IUOThf { display:flex; -ms-overflow-style:none; gap:6px; overflow-x:scroll; overflow-y:hidden; scrollbar-width:none; white-space:nowrap } .IUOThf::-webkit-scrollbar { display:none } .IUOThf>* { display:inline-flex; height:40px } .RWhoyd span { display:flex } .FMKtTb { font-family:Google Sans,arial,sans-serif-medium,sans-serif; font-size:14px; width:fit-content } .FMKtTb span { display:inline-block } .GKS7s { display:flex; align-items:center; height:40px; justify-content:center; background:#fff; border:1px solid #dadce0; box-sizing:border-box; border-radius:20px; min-width:38px; cursor:pointer } .sohiBf { box-sizing:content-box; border:none; border-radius:12px; height:30px } .vLLM5d, .GKS7s.vLLM5d { background:#ecedee } [selected].vLLM5d, [selected].GKS7s.vLLM5d { background:#a3c9ff } .bSsRe, [selected].bSsRe, .GKS7s .UqcIvb.bSsRe, [selected].GKS7s .UqcIvb.bSsRe { color:#202124 } [selected].GKS7s { border-color:#e8f0fe; margin:0; outline:solid 2px #fff; background-color:#e8f0fe; } .GKS7s:hover { background-color:#f1f3f4 } [selected].GKS7s:hover { background-color:#d2e3fc; border-color:#d2e3fc } .GKS7s .RWhoyd { color:#1a73e8 } [selected].GKS7s .RWhoyd { color:#1558d6 } .GKS7s .FMKtTb, .GKS7s .RWhoyd.mol54e { color:#202124 } [selected].GKS7s .FMKtTb, [selected].GKS7s .RWhoyd.mol54e { color:#1558d6 } .XAHwbe { background:#e8f0fe; border-radius:20px 0 0 20px; width:28px; margin-right:-18px; display:flex; align-items:center; height:40px; justify-content:flex-start } .Ps6jAe { display:flex; align-items:center } .UqcIvb { margin:0 14px } .GKS7s .RWhoyd.It8jtb { margin:0 4px 0 8px } .GKS7s .FMKtTb.DNJVhe { margin-right:14px } .GKS7s .RWhoyd.niUbQb { margin:0 6px 0 10px } .GKS7s .FMKtTb.niUbQb { margin-right:12px } .GKS7s .FMKtTb.QpeSYd, .ePSouf .FMKtTb.QpeSYd { margin-left:16px } .GKS7s .RWhoyd.QpeSYd, .ePSouf .RWhoyd.QpeSYd { margin-right:8px } .GKS7s .Mko8Ne.QpeSYd, .ePSouf .Mko8Ne.QpeSYd { margin-right:8px } .xwtLye { display:flex; align-items:center; height:100% } .YmvwI { display:flex; margin:4px 12px 1px 12px; height:20px; color:#70757a; font-family:Google Sans,arial,sans-serif-medium,sans-serif; font-size:14px; width:fit-content } [selected].YmvwI { border-bottom:2px solid #202124; color:#202124; margin-top:7px; padding-bottom:1.5px } .SvoXfb { box-sizing:border-box; align-items:center; appearance:none; background-color:transparent; border:none; border-radius:50%; bottom:0; cursor:pointer; display:flex; height:40px; justify-content:center; opacity:0; outline:none; margin-right:0; position:absolute; top:0; width:40px; visibility:hidden } .SvoXfb:hover { background-color:#f1f3f4 } .x5f7Bc { fill:#5e5e5e; height:24px; width:24px } .SvoXfb:hover>.x5f7Bc { fill:#4d5156 } .SvoXfb.vezEod .x5f7Bc { transform:scale(-1) } .F9Idpe { background:linear-gradient(to right, transparent 0%, #fff 60%, #fff); height:100%; opacity:0; margin-right:0; position:absolute; top:0; visibility:hidden; width:100px; pointer-events:none } .F9Idpe.Iy1nvd { background:linear-gradient(to left, transparent 0%, #fff 60%, #fff) } .Iy1nvd { left:0 } .vezEod { right:0 } .vBfb5 { opacity:1; visibility:visible } .rfiSsc { position:relative; } .sBbkle { display:flex; height:max-content; padding-bottom:16px } .sBbkle { padding-left:calc(var(--center-abs-margin) - 20px) } .sBbkle.Pusuaf, .sBbkle.jBcnsd.Pusuaf { border-bottom:1px solid #dadce0 } @media (max-width:1300px) { .sBbkle { padding-left:calc(var(--center-abs-margin) - 4px) } } .TrmO7 { white-space:nowrap; flex:1; min-width:0; position:relative } .nfSF8e { background-color:transparent; border-radius:8px; box-sizing:border-box; color:#5e5e5e; cursor:pointer; font-family:Google Sans,arial,sans-serif; height:40px; line-height:40px; border-radius:8px; margin-right:-9px; padding:0 9px } .nfSF8e:hover, .WRhYSc:hover { background-color:#f1f3f4; color:#202124 } .nfSF8e.hdtb-tl-sel { background:unset; background-color:#e8f0fe; border:none; box-shadow:none; color:#1a73e8 } .nfSF8e.hdtb-tl-sel:hover { background-color:#d2e3fc } .xhjkHe { position:relative; display:flex; flex:1; max-width:calc(var(--center-width) + var(--rhs-margin) + var(--rhs-width) + 20px); } .xhjkHe .TrmO7 { width:0 } .sKb6pb { align-items:center; display:flex; justify-content:flex-end } .WRhYSc { border-radius:8px; box-sizing:border-box; font-family:Google Sans,arial,sans-serif; height:40px; margin-left:24px; margin-right:11px; white-space:nowrap } .WRhYSc .hdtb-mitem { margin:0 } .WRhYSc .hdtb-mitem a { color:#5e5e5e; text-decoration:none } .WRhYSc:hover .hdtb-mitem a { color:#202124 } @media (max-width:1435px) { .xhjkHe.CEXVle:not(.YoVbHc) { width:calc(100% - 155px) } } .xhjkHe.YoVbHc { flex:unset; width:calc(var(--center-width) + 20px) } @media (max-width:1300px) { .xhjkHe.YoVbHc { width:calc(var(--center-width) + 4px) } } .IDFSOe { background-color:#dadce0; width:1px; height:20px; margin-left:3px; margin-right:3px } .XtQzZd { height:100%; pointer-events:none } .Y4umW { pointer-events:initial } [dir='ltr'], [dir='rtl'] { unicode-bidi:isolate; unicode-bidi:isolate } bdo[dir='ltr'], bdo[dir='rtl'] { unicode-bidi:bidi-override; unicode-bidi:isolate-override; unicode-bidi:isolate-override } .GyAeWb { display:flex; justify-content:flex-start; flex-wrap:wrap; max-width:calc(var(--center-abs-margin) + var(--center-width) + var(--rhs-margin) + var(--rhs-width) + var(--lhs-refinements-width)); } .srp { --center-abs-margin:180px; --center-width:652px; --rhs-margin:76px; --rhs-width:372px; --lhs-refinements-width:0px; --lhs-margin:24px; --lhs-width:calc(var(--center-abs-margin) - var(--lhs-margin) - var(--center-margin)); --center-margin:24px; position:relative; min-height:100vh } @media (min-width:1475px) and (max-width:1675px) { .srp { --center-abs-margin:calc(25vw + -188.75px) } } @media (min-width:1675px) { .srp { --center-abs-margin:230px } } @media (min-width:1124px) and (max-width:1300px) { .srp { --center-abs-margin:calc((100vw - 1068px)/2) } } @media (max-width:1124px) { .srp { --center-abs-margin:28px } } .eqAnXb { font-size:medium; font-weight:normal; } .main { min-width:calc(var(--center-abs-margin) + var(--center-width) + var(--rhs-margin) + var(--rhs-width) + var(--lhs-refinements-width)); width:100%; } .s6JM6d { position:relative; width:var(--center-width); flex:0 auto; margin-left:var(--center-abs-margin); } .e9EfHf { font-family:arial,sans-serif; clear:both; margin-left:0; padding-top:20px; } .dodTBe { height:68px } .appbar { background:#fff; position:relative; -webkit-box-sizing:border-box; border-top:1px solid #dadce0; padding-left:var(--center-abs-margin) }
Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML
. You can also specify the stylesheet information in styles.css
tab and scripts information in scripts.js
tab and start coding.
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>