Navigation

Basic Elements Headings Text Formatting Lists Tables Images & Hyperlinks Forms Special Characters Refering to Insert

HTML Basics

This page covers the fundamental elements, tags, and attributes in HTML, along with examples for better understanding.

1. Basic Elements

<!DOCTYPE html> <html> <head> <title>My First Webpage</title> </head> <body> <h1>Welcome to HTML</h1> </body> </html> ---------------------------------------

Welcome to HTML

2. Headings

<h1>Main Heading</h1> <h2>Subheading</h2> <h3>Section Heading</h3> ---------------------------------------

Main Heading

Subheading

Section Heading

3. Text Formatting

<p>This is a paragraph.</p> <b>This text is bold.</b><br> <i>This text is italicized.</i><br> <u>This text is underlined.</u><br> Break between<br>the text<br> Horizontal line between<hr>the text ---------------------------------------

This is a paragraph.

This text is bold. This text is italicized. This text is underlined. Break between
the text Horizontal line between
the text

4. Lists

<ul> <li>Item 1</li> <li>Item 2</li> </ul> <ol> <li>First</li> <li>Second</li> </ol> ---------------------------------------
  1. First
  2. Second

5. Tables

<ul> <li><code><table></code>: Defines a table.</li> <li><code><th></code>: Table header cell.</li> <li><code><tr></code>: Table row.</li> <li><code><td></code>: Table data cell.</li> </ul> ---------------------------------------
Subject Grade
Math A
Science B

6. Images & Hyperlinks

Images

<img src="Fake.jpg" alt="Image does not exist"><br> <img src="https://cdn.avero-tech.com/asrjc/img/logo.png" alt="ASRJC Portal"><br> <img src="{{ url_for('static', filename='HelloWorld.jpg') }}" alt="Hello World"> --------------------------------------- Image does not exist
ASRJC Portal
Hello World

Hyperlinks

<a href="{{ url_for('CSS') }}">Go to CSS Page</a> <a href="https://www.google.com">Visit Google</a> --------------------------------------- Go to CSS Page Visit Google

7. Forms

<form action="/submit" method="POST"> <label for="name">Name:</label> <input type="text" id="name" name="name"> <br> <label for="House">Choose a House:</label> <select name="House" id="House"> <option value="Artemis">Artemis</option> <option value="Helios">Helios</option> <option value="Poseidon">Poseidon</option> <option value="Athena">Athena</option> </select> <br> <label>Choose your favorite programming language:</label> <input type="radio" id="python" name="language" value="Python"> <label for="python">Python</label> <input type="radio" id="javascript" name="language" value="JavaScript"> <label for="javascript">JavaScript</label> <input type="radio" id="java" name="language" value="Java"> <label for="java">Java</label> <br> <label>Select your hobbies:</label> <input type="checkbox" id="reading" name="hobby" value="Reading"> <label for="reading">Reading</label> <input type="checkbox" id="traveling" name="hobby" value="Traveling"> <label for="traveling">Traveling</label> <input type="checkbox" id="gaming" name="hobby" value="Gaming"> <label for="gaming">Gaming</label> <br> <label>Upload your profile picture:</label> <input type="file" id="profile-pic" name="profile-pic"> <br> <input type="submit" value="Submit"> </form> ---------------------------------------

8. Special Characters

9. Refering to Insert

This insert is provided during your exams and do use it only for reference

HTML Reference