Html Elements
A Brief Intro to HTML5 Elements
Elements form the basic structure of an HTML page. It gives meaning to the structure and helps to improve the Website. Therefore it is important to have an idea about what actually HTML elements are...
Here we will discuss the types and structure of elements and a few basic elements of HTML.
Structure and Types of Elements
An HTML element starts with "<" Name of element ">".
"<html> just like this."
Types
There are two types of elements.
Usually, every HTML element needs a closing tag the closing tag looks like this
"</" Name of element ">".
"</html> just like this."
So opening and closing tags together makes an element look like this <html>.....</html>
Now there are a few elements that don't need any closing tags. i.e, </br> tag.
we call these elements Void elements.
Basic Elements
To make it simple let's divide these elements into simple form.
Semantic
The Elements Define the Semantics of a page.
<h1>......<h6>
Use to make headings.
<p>
Use to write simple text.
<a>
Use to give a link.
<ul>
use to create an unordered list
<ol>
Use to create an ordered list
<tr>,<td>
Use to create table`s rows and fill data
<img>
Use to insert an image.
<form>
Use to create Forms.
<input>
Use to input something
Structure
These elements use to define the structure of page
<HTML>
Use to form the basic structure of an HTML page.
<head>
It contains Meta information about an HTML page.
<body>
Contains the all elements and content for the viewer.
<header>
It defines the upper portion of the HTML page.
<footer>
Contains the data which lies at the bottom of the page.
<main>
Contains the data between the header and footer
<aside>
Contains the information which we usually see on the side of the page.
<article>
it contains its own information.
<section>
Divide the page into different sections
<nav>
Use to create Navbar
Formatting
Use to format the page content
</br>
Adds a line break.
<i>
Use to make the text italic.
<em>
Use to emphasize the importance of text and make it italic.
<strong>
Use to give importance to text and make it bold
<sub>,<sub>
use to make superscripts and subscripts.
<pre>
Use to format text as it is written.
<code>
Use it to add some code.
These are a few Elements to create a html page.
Tag names for HTML elements may be written in lowercase and uppercase letters that are a case-insensitive match for the names of the elements given in the HTML elements section of this document; that is, tag names are case-insensitive.
Subscribe to my newsletter
Read articles from Nauman Goraya directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by