You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Bold --><!-- Emmet shortcut: b --><b>This is bold</b><!-- Paragraph --><!-- Emmet shortcut: p --><p>This is a Paragraph.</p><!-- Heading --><!-- There should only be ONE h1 on a page. --><!-- Following content gets pushed to the next line automatically. --><!-- Emmet shortcut: h --><h1>This is a heading</h1><!-- Anchor --><!-- Emmet shortcut: a --><ahref="page2.html">Page 2</a><ahref="https://example.com">Website</a><!-- Image --><!-- Emmet shortcut: img --><imgsrc="profile.jpeg" alt="Profile Photo"><imgsrc="https://upload.wikimedia.org/wikipedia/commons/b/bd/Golden_Retriever_Dukedestiny01_drvd.jpg"
alt="Golden Retriever"><!-- Comment --><!-- VSCode Shortcut: Cmd + / -->
List
<!-- List --><!-- Emmet shortcut: ol>ui*3 --><!-- Emmet shortcut: ol>ui* (Wraps existing text) --><ol><li>Amadeus</li><li>Stand By Me</li><li>Amelie</li></ol><ul><li>Alien</li><li>Parasite</li><li>Annie Hall</li></ul>
<!-- form `action` attribute: The URL that processes the form submission. --><!-- label `for` attribute: Id of the associated form element. --><!-- input `type` attribute eg: text, password, submit etc. --><!-- input `name` attribute: Submitted with the form as part of a name/value pair. --><!-- input `value` attribute: Initial Value. --><body><formaction="page2.html"><labelfor="username"> Username </label><inputtype="text" name="username" id="username" value="Initial Value"><labelfor="password"> Password </label><inputtype="password" name="password" id="password"><inputtype="submit" value="Click to Submit!"></form>
Button behaviour inside & outside forms
<!-- By default, if a button is inside a form, it always submits the form when clicked. --><formaction="page2.html"><button>This button submits</button></form><!-- Only way to prevemt a button (inside a form) to not submit is to set its `type` attribute to "button" --><formaction="page2.html"><buttontype="button">This button doesn't submit</button></form>
Semantic Elements
<!-- Used to group content so it can be easily styled --><!-- Block-level --><div>Some content here</div><!-- Used to group elements for styling purposes --><!-- Inline -->
Some other contect. <span>This is inside span.</span>
<body><!-- Represents introductory content --><header>This is a header</header><!-- Provides navigation links --><nav>
These are nav elements.
<ahref="page1.html">Page 1</a><ahref="page2.html">Page 2</a><ahref="page3.html">Page 3</a></nav><!-- Content that is the central topic of a document --><main><!-- Independently distributable or reusable content --><article><h1>This is article header</h1><p>This is article body</p></article><!-- Represents a generic standalone section of a document --><!-- Should always have a heading --><section><h1>This is section 1 header</h1><p>This is section 1 body</p></section><!-- Content is only indirectly related to the document's main content --><!-- Eg. sidebars or call-out boxes --><aside><ul><li>Aside list item 1</li><li>Aside list item 2</li><li>Aside list item 3</li><li>Aside list item 4</li></ul></aside></main>
typically contains information about the author of the section, copyright data or links to related documents.
<!-- Eg. author, copyright data, links etc --><footer>This is a footer</footer></body>