HTML Basic

In this chapter we will show some basic HTML examples.

Don't worry if we use tags you have not learned about yet.

HTML:- Hypertext Markup Language, the language used to create web pages.
Tags:- The building blocks of HTML, enclosed in angle brackets, that define the structure and content of a web page.
Elements:- The combination of opening and closing tags and their content, which define the structure of a web page.
Attributes:- The additional information provided within an opening tag that modifies the behavior or appearance of an element.
Head:- The section of an HTML document that contains metadata about the document, such as the title and links to external resources.
Body:- The section of an HTML document that contains the actual content of the web page.
DOCTYPE:- A declaration that specifies the version of HTML being used in the document.
Web Browser:- The software used to display HTML documents on the internet.
Text Editor: A software used to create and edit HTML documents.
CSS:- Cascading Style Sheets, a language used to style HTML documents and control their layout and appearance.

HTML Documents
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>.

Example
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
The <!DOCTYPE> declaration is not case sensitive.
The <!DOCTYPE> declaration for HTML5 is:
<!DOCTYPE html>

HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:

Example
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>

HTML Paragraphs
HTML paragraphs are defined with the <p> tag:

Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

HTML Links
HTML links are defined with the <a> tag:

Example
<a href="https://www.w3schools.com">This is a link</a>
The link's destination is specified in the href attribute.
Attributes are used to provide additional information about HTML elements.
You will learn more about attributes in a later chapter.

HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:

Example
<img src="Google photo.jpg" alt="google.com" width="104" height="142">

More Details HTML Basic
HTML (Hypertext Markup Language) is a markup language used to create web pages. HTML is the foundation of all web pages and provides a structure for organizing content on the web. In this article, we will explore the basic concepts of HTML and how it works.

HTML uses tags to create web pages. Tags are enclosed in angle brackets (<>), and they tell the web browser how to display the content. HTML tags consist of an opening tag, a closing tag, and the content in between. For example, the opening tag for a paragraph is <p>, and the closing tag is </p>. The content in between the tags is the text that will be displayed on the web page.

Read More:- HTML Elements

HTML tags can also have attributes, which provide additional information about the tag. Attributes are used to modify the behavior of the tag, such as setting the color of text or adding links to other web pages. Attributes are specified within the opening tag of a tag, using the syntax attribute="value". For example, to set the background color of a web page, we use the <body> tag with the background-color attribute: <body style="background-color: blue;">.

HTML documents have a structure that consists of two main parts: the head and the body. The head section contains information about the document, such as the title, metadata, and links to external resources. The body section contains the actual content of the web page, such as text, images, and links.

The HTML document starts with the <!DOCTYPE> declaration, which tells the web browser which version of HTML is being used. The declaration is followed by the <html> tag, which contains the head and body sections of the document. The head section is enclosed in the <head> tags, while the body section is enclosed in the <body> tags.

HTML provides many tags for creating different types of content on a web page. Some of the most common tags include:
<p>: creates a paragraph of text
<a>: creates a hyperlink to another web page
<img>: displays an image on the web page
<ul> and <li>: creates an unordered list of items
<ol> and <li>: creates an ordered list of items
<h1> to <h6>: creates headings of different sizes
In addition to these basic tags, HTML also provides tags for creating tables, forms, and multimedia content. HTML also allows you to style your web pages using CSS (Cascading Style Sheets), which allows you to control the layout and appearance of your web page.

HTML documents can be created using a text editor, such as Notepad or Sublime Text, or using an HTML editor, such as Adobe Dreamweaver or Microsoft FrontPage. Once you have created an HTML document, you can view it in a web browser, such as Google Chrome, Mozilla Firefox, or Microsoft Edge.

Read More:- HTML Attributes

When you view an HTML document in a web browser, the browser reads the HTML code and displays the content of the document on the screen. The web browser interprets the HTML tags and their attributes to determine how to display the content. For example, the <p> tag tells the web browser to display the text as a paragraph, while the <img> tag tells the web browser to display an image.

In conclusion, HTML is the foundation of all web pages and provides a structure for organizing content on the web. HTML uses tags to create web pages, and tags can have attributes that modify their behavior. HTML documents have a structure that consists of the head and body sections, and HTML provides many tags for creating different types of content on a web page. HTML documents can be created using a text editor or an HTML editor, and they can be viewed in a web browser.



Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.