HTML Course
HTML is a special language used to make web pages. When you use HTML, you can create your own website. The best part is , learning HTML is too difficult, and it can be a lot of fun too!.
Example :-
<!DOCTYPE html>
<html>
<head>
<title> page_title</title>
</head>
<body>
<h1> This is heading</h1>
<p> This is paragraph</p>
</body>
</html>
What is HTML ?
=> HTML is short form of Hyper Text Markup Language, and it is used to create web pages, It serves as a standard markup language that describes the structure of a web page. To do this, HTML uses a series of elements that label different pieces of content on the page. These elements tell the browser how to display the content, such as heading, paragraphs, and links. So, in essence, HTML provides a framework for organizing and presenting information on the web.
A simple HTML document :-
<html>
<head>
<title></title>
</head>
<body>
<h1> this is heading</h1>
<p> this is paragraph</p>
</body>
</html>
Above document Explain:-
- The <!DOCTYPE html> --declaration tells the browser that the documents is written in HTML5.
- The <html> -- element is the first and top-level element of an HTML page
- The <head> -- element contains additional information about page , such as meta tags, stylesheets, and scripts.
- The <title> --element specifies the title of the page, which is displayed in the browser's title bar or tab.
- The <body> -- element contains all the visible content on the page, including headings, paragraphs, images, links, tables, and lists.
- The <h1> --element is used for main heading or titles and is larger than other headings.
- The <p> --element is used to create paragraphs of text.
What is an HTML Element?
=> An HTML element comprises a start tag, some content, and an end tag. The start tag specifies the name of the element, enclosed in angled brackets, while the end tag is similar to the start tag but with a forward slash preceding the name. The content is the information or text enclosed between the start and end tags.
For instance , a heading element can be created using the following code:
<h1>My First Heading</h1>
Similarly, a paragraph element can be defined as:
<p> My first paragraph </p>
In summary, an HTML element is composed of three parts:
the start tag, content , and end tag , and the entire entity from the start tag to the end tag constitutes the element.
Start tag Element content End tag
<h1> This is my first heading </h1>
<p> This is my first paragraph </p>
<br> none none
Web Browsers:
=> A web browser (such as Chrome, Edge , Firefox, or safari) is a software application that lets you view web pages on the internet. Its main job is to read the HTML code that makes up a web page and use it to display the page correctly.
When you visit a website, your browser reads the HTML tags in the code to determine how to present the content on the page. You don't see these tags themselves, but your browser uses them to displaya everything from text and images to videos and links.
HTML page structure
2. HTML basic examples
HTML Documents :
=> To create a proper HTML document , you must include a document type declaration at the beginning : <!DOCTYPE html>
Next, the actual content of the document should be enclosed within <html> and </html> tags.
Finally, the visible content that will be displayed in the browser is contained within <body> and </body> tags.
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 sensitive
The <!DOCTYPE> declaration for HTML5 is :
<!DOCTYPE html>
HTML headings:
-HTML define <h1> to <h6> tags to create headings of different importance .
- The <h1> tag is used for the most important heading, while the <h6> tag is used for the least important heading.
Example :
<h1>this is h1</h1>
<h2>this is h2</h2>
<h3>this is h3</h3>
<h4>this is h4</h4>
<h5>this is h5</h5>
<h6>this is h6</h6>
HTML paragraph :
- Paragraphs in html are defined with the <p> tag:
<p> This is a paragraph </p>
<p> This is another another html paragraph</p>
HTML links:
- links in html are defined with <a> tag.
<a href="google.com">this is a link</a>
- link's destination is specified in 'href' attribute.
HTML Images :
-images in html are defined with <img> tag.
- this tag has attributes such as the image source (src), alternative(alt), width, and height.
<img src="googl.jpg" alt="google" width="google" height="144">
*source code view
*inspect in html element
0 Comments