HTML Body tags part2
Hello everyone! In this episode of HTML tutorials, I am going to teach you the HTML Body tags. Before we get into it, If you do not know where should you write your code or you do not know anything about the HTML head tags please check out the previous episodes.
HTML Body tags are the most important tags for a user or viewer of your website. What you write in “<body>” tag, It will appear on the page.
One of the most useful tag in the HTML Body Tags part2 (this article) is the Input tag, but what is the input? When we use input tag, it will create a input box and user could enter the data in the input box.
Therefore Input tags are really vital for the program, in simple term we use input to collect the data form the user. If you did not understand the input yet, you will learn it by the examples of down below.
First type |<input type=”text” />|
Here is some of inputs that would be handful for you:
<input type=”radio” /> : create radio button.
<input type=”password” />: hides the visible input. (password form)
<input type=”text” />: create input box with visible input.
type=”date”: creates calendar for user to enters the specified date.
type=”file”: user could attach file.
Some other features that the input tag has is the “placeholder” and “value” for instance:
<input type=”text” placeholder=”username” /> and <input type=”text” value=”username” /> run this two on the visual studio code and you will see the difference (take it as your homework).
image and video tag
You want to import an image? No problem use the image tag, How? Before I show you the picture or image tag, I should cite the source and alternative in this tag. In source you should put the link or the address of that particular picture and in the alternative you put the text that would shown if the page is unable to show your picture for any reason.
Now lets write the tag (alt is brief of alternative and src is the abbreviation of source ):
<img src=”the link or address” alt=”my picture” />
You can also use the “height” and “width” in this tag to resize your image.
<img height=”500px” width=”500px” src=”source” alt=”alternative text” />
HTML Body tags part2,To import the video type |<video src=”the source” poster=”the poster link or address” >type the alternative of video tag in here</video>| you may say that what is the poster? Poster is the thumbnail of your video. Video tag’s
Some other abilities of this tag is:
<video height=”500px” width=”500px” controls loop autoplay></video>
controls: give the video basic control, autoplay: plays the video automatically, loop: plays the video over and over again.
Share This Article on social media
this blog is written by Erfan Samadi
I hope you enjoyed! feel free to leave comment.