HTML means for Hyper Text Markup Language. HTML, a formatting system for displaying material retrieved over the Internet. Each retrieval unit is known as a Web page (from World Wide Web), and such pages frequently contain hypertext links that allow related pages to be retrieved. HTML is the markup language for encoding Web pages.. HTML markup tags specify document elements such as headings, paragraphs, and tables. They mark up a document for display by a computer program known as a Web browser. The browser interprets the tags, displaying the headings, paragraphs, and tables in a layout that is adapted to the screen size and fonts available to it.
HTML BASICS EXAMPLE
- All HTML documents must start with a document type declaration:
<!DOCTYPE html>
. - The HTML document itself begins with
<html>
and ends with</html>
. - The visible part of the HTML document is between
<body>
and</body>
HTML IN ELEMENT
An HTML element is often — but not always — created by opening and closing HTML tags, which wrap around a piece of content. Below is an illustration that labels each of the parts of an HTML element
The following example contains four HTML elements (<html>
, <body>
, <h1>
and <p>
):
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
WHAT IS HTML Attributes?
- Every HTML element is capable of having attributes.
- Attributes offer supplementary information regarding elements.
- Attributes are consistently specified in the opening tag.
- Typically, attributes are presented in name/value pairs, such as name=”value”.
What is the heading of the HTML?
HTML defines six hierarchical levels of headings. A heading element encompasses all font alterations, paragraph breaks preceding and following, and any required white space for rendering the heading. The heading elements range from H1 to H6, with H1 signifying the highest (or most significant) level and H6 representing the least.
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
output:
what do means by html paragraph?
.The HTML <p>
tag serves to define a paragraph and consists of both opening and closing tags. Anything enclosed between <p>
and </p>
is recognized as a paragraph. While most browsers may interpret a line as a paragraph even without the closing tag </p>
, relying on this behavior can lead to unexpected results.
Syntax: <p> Content </p>
Example: now i am using the <p> tag that is used for paragraphs in HTML.
<!DOCTYPE html>
<html>
<body>
<p>This text is normal.</p>
<p><b>This text is bold.</b></p>
</body>
</html>
output;
This text is normal.
This text is bold.
HTML text Editors:
- An HTML file is a text file, so to create an HTML file we can use any text editors.
- Text editors are the programs which allow editing in a written text, hence to create a web page we need to write our code in some text editor.
- There are various types of text editors available which you can directly download, but for a beginner, the best text editor is Notepad (Windows) or TextEdit (Mac).
- After learning the basics, you can easily use other professional text editors which are, Notepad++, Sublime Text, Vim, etc.
- In our tutorial, we will use Notepad and sublime text editor. Following are some easy ways to create your first web page with Notepad, and sublime text.
HTML text editors are given below:
- Notepad
- Visual Studio(VS Code)
- Notepad++
- Sublime Text 3