lets learn about HTML elements

Introduction

Hello everyone hope this html blog series is helping you to learn basics of web development at a beginner level so here we go, so in this blog we are going to learn about other elements and attribute which we can use to add creativity and kind of life to our html page, so let’s get started.

So the first topic is HTML Element:

HTML element is the words which have start tag and end tag and some content between the tags are called as Elements, HTML elements are further categorized into 2 types:

  • Nested HTML Elements: nested html elements which contain other element. for eg: <! DOCTYPE html>

<body>

<h1> Hello World </h1>

<p> I love my self. </p>

</body>

</html>

  • Empty HTML Elements: the elements which does not contain any content are called as empty html element. for example <br>, <hr> etc.

<! DOCTYPE html>

<body>

<h1> Hello World </h1>

<p> I love <br> my self. </p>

</body>

</html>

so this is it about elements, lets move to the next topic HTML ATTRIBUTE.

HTML Attributes

HTML attributes are a type of HTML element modifier. An attribute either modifies an element type’s default functionality or adds functionality to those element types that would otherwise be unable to function properly. There are several varieties. required attributes, optional attributes, standard attributes, and event attributes are the four types of HTML attributes: The required and optional attributes are usually used to change specific HTML elements. Most HTML elements can take advantage of the standard attributes.

The href Attribute

<a> tag defines a hyperlink. The href attributes specifies the URL of the page the goes to:

{ <a href=”link.in”>Link Name</a> }

The src Attribute

The <img> tag is used to embed an image in an HTML page. The src attributes specifies the path to the image to be displayed:

{ <img src=”image name.image type”> }

The width and height Attributes

The <img> tag should also contain the width and heightattributes, which specifies the width and height of the image (in pixels)

HTML Headings

  • HTML headings are title or subtitles that you want to display on a webpage.
  • HTML headings are defined with the <h1> to <h6>.
  • <h1> defines the most important heading. <h6> defines the least important heading.
  • <h1> heading should be used for main headings, followed by <h2> headings, then the less important <h3>, and so on……

HTML Styles

The HTML style attribute is used to apply different styles to an element, such as colour, font, and size.
HTML styles are used to format web pages by changing the font and background colour, raising the font size, and using various methods of font and text alignment.
In this way, we will enhance the appearance of our website. For web page decoration, HTML styles are used.

so that's it for this blog, we will see you guys in the next blog with other HTML topic, hope this blog was helpful for you guys, keep learning keep growing.

We make your business smarter and broader through the power of the internet. Researcher | Web developer | Internet of things | AI | www.wakeupcoders.com