Career skills to jumpstart your future.

LightSpeed HTML Coding For Beginners | Part-3 | Game-Changing Exclusive features of HTML

Advanced HTML Coding for Beginners Part-3

Now that you know how to beautify and step up your game with your web page and HTML Coding gets to know about some of the game-changing exclusive features of HTML which nobody will tell you about. But before that, check out Part-2 and Part-1 if you've not checked that out or are new around here. 


How to view an HTML Document in a Web Browser

 The Steps to view an HTML document in a web browser are given below. 

1. After you are done with your HTML Document, or you want to check the output of your code, you need to first save your document. To keep your file, click the data in the tab menu at the top.





2. In the drop-down menu, click on SAVE AS. 
















3. In the pop-up dialogue box, choose the desired destination for the document. Now, the most important part. Give the desired name to the file and give a .html extension. By default, the extension is .txt  . Giving the .html extension is important, as, without the .html extension, the file would be saved as a text document(.txt extension) and the browser won't be able to identify the file as an HTML Document.






4. Next, your file will be saved as an HTML Document. It will have the icon of your default web browser. (Pro-Tip: LightSpeedAC recommends you to use Google Chrome as your web browser) 


(Pro-Tip: Keep the NotePad or WordPad window open and minimized. This will help you to make future edits.)


5. Now, click on the file. The file will open in your default web browser.


6. You can now view the output.




Game-Changing Exclusive features of HTML

Now, you will get to know about the Game-Changing features of HTML that will help you to step up your HTML Code.

Let Us Get Started

1. Marquee Tag(<marquee>)The <marquee> is a non-standard HTML tag that is used to create a scrolling text or an image. It is used to make the text/image scroll horizontally across or vertically down the web page.


2. Attributes of the BODY element- There are 4 attributes of the BODY element. They include- BGCOLOR attribute, LEFTMARGIN attribute, TOPMARGIN attribute and TEXT attribute.



  • BGCOLOR attribute- The BGCOLOR attribute is used to set the background color of the document. The attribute value can be a color name or a hexadecimal code. Example- <body bgcolor="pink"> OR <body bgcolor="#ffc0cb"
  • LEFTMARGIN attribute- The LEFTMARGIN attribute is used to set the left margin. The attribute value is a numeric value where the unit is pixels. Example- <body leftmargin="35px">
  • TOPMARGIN attribute- The TOPMARGIN attribute is used to set the top margin. The attribute value is a numeric value where the unit is pixels. Example- <body topmargin="60px">
  • TEXT attribute- The TEXT attribute is used to set the color of the text in the document. The attribute value can be a color name or a hexadecimal code. Example- <body text="blue"> OR <body text="0000ff">

Rules For HTML Coding

HTML is one of the only languages that does not give errors. HTML simply does not show the desired output. But, certain rules are needed to be followed to get the desired output. There are 6 basic rules you need to follow to get the perfect code. They are

1. Tags are always surrounded by angle brackets (less than < / greater than characters >). For example, <head>

2. Tag names and attribute names are not case sensitive. For example, <BODY> is the same as <body>.

(Pro-Tip- It is better to use lower case. In future versions of HTML, lowercase will be mandatory)

3. Spaces between tags do not matter. For example,
<u> LightSpeedAC </u>

is the same as

<u> LightSpeedAC </u>


4. Attribute values can be case sensitive, but very rarely in very few cases.

5. Tag names cannot contain spaces. For example-

<b o d y > is not the same as <body>. Also, there should be no space between < and > in a tag. So, do not write < u > or </ u>.

6. Elements can be in any order and order does not matter in HTML. For example, if you want to underline text, make it bold and italicize the text, you can write:


<b><u><i> LightSpeedAC </i></b></u>





I hope you enjoyed and learned basic HTML. If you think you have learned everything properly, give us feedback in the comments. 

Give suggestions in the comment box and e-mail us at aaditchhayabusiness@gmail.com.

Don't forget to talk to the LightSpeedAC Bot.

Comments

Popular posts from this blog

LightSpeed Basic Animation for Beginners in Flash 8 | Part-2

LightSpeed Intro to ConvNets

A honest review of the Data and Deployment Specialization

LightSpeed Basic Animation for Beginners in Flash 8 | Part-1

LightSpeed intro to Deep Learning