HTML Basic

Last Updated:

HTML Basic Document

In the following example, we will create a basic HTML document.

Example

HTML Online Editor
<!DOCTYPE html> <html> <head> <title>This is a Heading</title> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> </body> </html>

HTML Headings

The <h1> to <h6> tags are used to specify the HTML headings.

The <h1> tag is the most important heading and the <h6> tag is the least important heading.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <h1>This is a Heading 1</h1> <h2>This is a Heading 2</h2> <h3>This is a Heading 3</h3> <h4>This is a Heading 4</h4> <h5>This is a Heading 5</h5> <h6>This is a Heading 6</h6> </body> </html>

HTML Paragraph

The <p> tag defines a paragraph.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>This is a paragraph.</p> </body> </html>

HTML Links

The <a> tag defines a hyperlink. This is usually a link to another document.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <a href="/css">Learn CSS.</a> </body> </html>

HTML Button

The <button> tag is used to create a clickable dummy HTML button.

Note: Use JavaScript to perform action when a button is clicked.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Button with no functionality</p> <button>click me</button> </body> </html>

Share this Page

Meet the Author