Sunday , 9 May 2021
Breaking News

5 Simple HTML Practices for Beginner

So you are a beginner to website development and don`t know what to do to customize your own blog? Well, actually you just need some basic knowledge about HTML coding when you wish to change small part of the blog or just add a little touch on it. Here we have five simple HTML code to help you out.

 

1. Always Close Your Tags

In past years, HTML code somehow has things like this:

1 <li>Main text here.

2 <li>Supporting text here.

3 <li>Anything you want to write goes here.

You can notice that the Li tag wasn`t close. in today`s standard that practice is considered as bad practice and you should avoid it. Remember to always close your tags or you will get validation trouble in each turn. So it must look like this

1  <ul>

2    <li>Main text here. </li>

3    <li>Supporting new text here. </li>

4    <li>Anything you want to write goes here. </li>

5 </ul>

 

 

2. Never Use Inline Styles and Inline Javascript

When you are working for your markup and feel like to take the easy route and give it styling, that`s a no go. When creating the markup, your job is about adding codes, not the styling. You can add the styling when the markup is finish and then reference the P tag from the external stylesheet. Example of inline style:

1 <p style=”color: yellow;”>I’m going to make this text yellow so it goes well with my style </p>

 

You can use this code when you finish the markup.

1 #someElement > p {

2   color: red;

3 }

 

This rule also works for place Javascript command within tags. Inline Javascript is also a no go for today`s standard.

 

 

3. Put stylesheets files within the Head Tag

In HTML, it`s recommended to place the stylesheets files within the Head tag. It will make your website load faster. so the code wil go like this.

1 <head>

2 <title>My Favorites Home Design</title>

3 <link rel=”stylesheet” type=”text/css” media=”screen” href=”path/to/file.css” />

4 <link rel=”stylesheet” type=”text/css” media=”screen” href=”path/to/anotherFile.css” />

5 </head>

 

 

4. Keep the Tag in lowercase

 

Basically, you can capitalize the tag names, but mostly people don`t use capital word in their website or blog due to reader in mind. You can always have tags like this.

 

1 <DIV>

2 <P>Here’s Where You Can Find Best Design </P>

3 </DIV>

 

But it`s better like this.

 

1 <div>

2 <p>Here’s Where You Can Find Best Design </p>

3 </div>

 

 

5. Download and Use Firebug

Firebug is the best plugin when you create a website. It provides incredible process for Javascript debugging and informs you the elements that you are unaware of. You also need to fully utilize the Firebug for creating better and faster website.

 

Find the best windows hosting services at SeekDotNet.com at cheap price.

goldyn-francine