Basics of HTML- Learn web dev online

Learn Web development online (Beginner's Guide)

What is HTML?

  • HTML stands for Hyper Text Markup Language.
  • HTML is the standard markup language for creating web pages.
  • HTML describes the structure of a web page.
  • HTML consists of a series of elements.
  • HTML elements tell the browser how to display the content.
  • HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

 Basics of HTML language 

Learning HTML (HyperText Markup Language) is a great first step into web development. Here’s a guide to the most basic concepts and elements you need to start.




1. Install Vs code editor, customize it according to your will.

          2.  learn the basics of HTML

          3. Always be practical with learning don't stick with the tutorials only

4. Dont invest too much time in learning HTML, understand the basics and proceed to next language. Dont wait for perfection, this is project base learnings.

Before diving into the structure and syntax (rule) of HTML let's talk about some of the most important basics where every fresher got stuck.

What is an HTML Element, Tag, and Attribute?


Element, Tag, and attributes are the most common and repetitive terms of HTML, you will always hear these terms continuously throughout this course, so you need to know about these terms before diving into the course blindly.

What is a Tag in HTML?

Tags are words enclosed within `<` and `>` angle brackets.

They serve as keywords that tell the web browser how to format and display the content.
Many of the tags have pairs or opening and starting ends, both tags are the same but the end tag ends with a a forward slash (/) before the tag name.

if you have an opening tag like <p>, the corresponding closing tag would be </p>.

Consider these examples:

  • <!DOCTYPE html>
  • <h1></h1>
  • <html></html>
  • <body></body>         

These are commonly used tags in HTML, you will learn many more 


What is an Element of HTML?

An HTML element is defined by a start tag and some content in between that helps the browser display the information correctly on a web page, which ends with a closing tag:

<tagname> Content goes here... </tagname>

This whole is an HTML element from the starting to the closing tag:





Check out some of the examples below

1. <h1>My first website</h1> (HTML element)
2. <p>My first website.</p> (HTML element)

 

What is an HTML Attribute? 

HTML attributes provide extra information about an element. They are added within the opening tag and consist of a name and a value. Attributes help control how an element behaves or appears on the page.

Attribute format:

<tag name attribute> </tag name>

For example:

1. "href" is an Attribute in this Links

The "href" attribute specifies the URL of the page the link goes to.





Now we will discuss the basic document structure of HTML language.


HTML Basic Document Structure






 








Let's understand this example through the points below:

  • The <!DOCTYPE html> declaration defines that this document is an HTML5 document
  • The <html> element is the root element of an HTML page
  • The <head> element contains meta-information about the HTML page
  • The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)
  • The <body> element defines the document's body and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
  • The <h1> the element defines a large heading
  • The <p> the element defines a paragraph

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>, its considered the root element because it covers all the content found in a web page.

The visible part of the HTML document is between <body> and </body>.

First HTML exercise:












This is how your page looks like after this exercise














This is all about today we will discuss other concepts later in this course.


Comments

Popular posts from this blog

Block and Inline Elements of HTML

CSS - Introduction