Introduction
HTML is an acronym for HyperText Markup Language, and it is the
standard language for creating web-pages. Every web page you surf on
your browser is built using HTML. The primary use of HTML to provide
a proper structure to the web-page so all the content or data of the
page could represent adequately. A stand-alone HTML can create only
static and skeleton looking black and white pages, but with the help
of CSS and JavaScript , we can create a more interactive and
intuitive web-page. When we try to visit a website or click on the
link, we basically request the server to show us the page, then the
server acts on our request and sends us an appropriate HTML document
as a response. Then this HTML document parsed by browse, and we able
to see the content.
HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
HTML Editors
However, you can use notepad to create and edit HTML documents, but
we recommend to install an open-source editor. There are many free
to use text-editor software present on the internet, which provides
a better interactive User interface and some add-on functionality
which you miss on a notepad.
Here is the list of top 4 HTML text editors you can pick:
- Sublime Text Editor
- Notepad++
- Visual Studio Code
- Atom
HTML Elements
The HTML elements provide the semantic meaning to the web-page
content. We usually interchangeably use the term HTML elements and
tags, but technically both are different. An HTML tag is just a
character inside the angle bracket<>, whereas the HTML element is a
collection of starting tag, its attribute, content and end tag. For
example:
<p class= "para"> Hello World </p>
HTML Attributes
In HTML, the attributes are used to provide additional information
about the elements. For most of the HTML elements, attributes are
optional, but there are some elements where we have to deliver the
attributes. Attributes always specified within the opening tag of
the HTML element and they specified in a name and value pair.
Example
<image src= "cat.jpg" alt ="cat image">
In this example src ="cat.jpg" and alt="cat image" are two
attributes where src and alt are attributes name and "cat.jpg" and
"cat image" are attributes values. Here alt attribute is optional,
but src is mandatory because src specify which image to show. There
should be at least one space gap between two attributes, and the
value of the attributes must have resided in the double inverted
comma. Some most important HTML
HTML Heading
To display the section heading, title or subtitle we can use the HTML
heading tags. In HTML 5 we have 6 heading tags start from <h1>
up to <h6>, where <h1> specify the largest heading and
<h6> represent the smallest or sub heading. If the content is
specified by heading tags, then it would be displayed large and bold
as compared to other text content present on the web-page.
Example
<h1>First Heading </h1>
<h2>Second Heading </h2>
<h3>Third Heading </h3>
<h4>Forth Heading </h4>
<h5>Fifth Heading </h5>
<h6>Sixth Heading </h6>
HTML Paragraph
In HTML paragraphs can be defined using <p> element. Paragraph
text always starts from a new line, the browser parsed the <p>
tag and automatically add some margin and white space after the end
</p> tag.
<p> Hello! and Welcome to TechGeekBuzz </p>
<p> Here you get to know all about the latest technology. </p>
HTML Style
Every browser has a specific engine that parses the HTML document and displays a default style of the page content.
<body style="background-color:yellow;">
<h1>TechGeekBuzz</h1>
<p>Welcome to TechGeekBuzz.</p>
</body>