Understanding Syntax rules and how to edit codes to avoid errors

I have once written about syntax error which normally occurs in wapka host but to be sincere i felt my explanations were not clear enough not because I don't know what am writing but because explaining the syntax error online without face to face tutor is somehow difficult to understand but in this post am going to use very easy codes to explain it to your understanding so please and please pay attention to every new line you are going to read.

wapka syntax rules Before you go on editing Any Code there are rules you Must adhere to and this rules are what we called syntax rules of HTML and XML.

Syntax Rules You Must Obey



Every Begin Tag must have End Tag



One of the syntax rules you must put in consideration when editing any HTML or XML documents is the end tag and begin tag

Example of begin tag is <> and end tag is </> Can you see that ?

inside the tags they might contain anything such as the bold, italic, strong, h1-h6 etc failure to end any begin tag in XML documents will lead to syntax error.

See example bellow

<b>I am Kennedy Prosper</b>

the above will appear bold as show bellow simply because you used the begin and end tag Bold .

I am Kennedy Prosper

Can you see that !! now look again this is an underlined text <u>I am Kennedy Prosper</u> which will appear as I am Kennedy prosper what am trying to explain is that in XML documents everything that starts with begin tags must have end tags to avoid syntax error

XML/ HTMl documents are case sensitive



When using this tags you shouldn't use capital letters and small letters in your begin tags and end tags e.g <u>I am Kennedy Prosper</U>

that's will give you syntax error because the first tag is small letter therefore the end tag is also expected to end with small letter not capital letter .I.e Both must have the same characters. if it is upper case let both have capitals letters and if it is lower case let both have lower case lest if you mix it together that will result syntax error.

Must be properly Nested



These documents can contain other documents in one body.E.g See example bellow

<i><u><b>Kennedy prosper is the teacher </b></u></i>

That is a combination of italic, underline and bold which will appear as bellow

Kennedy prosper is the teacher

Can you see how it was nested ? you can't just use the tags any how when combining them if you started with bold , the same bold must end it if you followed it with italic the same italic must follow it.

Must be Properly Quoted



In HTML documents there are always quotes and when these quotes are wrongly used it will result syntax error

" is different from ' now see bellow example <font color="red">Am Kennedy</font>

<font color='red'>Am Kennedy</font>

They will both appear as the same but you must not use " and ' in the same code like e.g

<font color="red'>Am Kennedy </font> that code will show error

Having known the above basics how can you use the above in relationship to source code viewing. let say you just visited a website and you love some code lines which you love to extract using the source code viewer see example of how you can do that bellow.

<p></p> <p align="center"><div class="new"><br/><font color="red"><b>WARNING:-</b></font> Note any code copied from other sites to merge with our <b>tutorials </b>rather than using the <u>provided codes </u>is at you own <b>Risk</b> </div></p> <p align="center"> <script>document.getElementById('had_1').appendChild(document.getElementById('had'));</script> <p><p><style> .bottom_ads{background: #333; margin-right: -1px; border-bottom: 1px solid #222} .dds{display: none} .mtb{border-top: 1px solid #111} .mtt{border-bottom: 1px solid #666;padding: 0px 5px 2px 5px} .mtt img{width: 30px}.mfooter li{white-space: nowrap; text-overflow: ellipsis; overflow: hidden} </style><div style="margin-top: 4px;" class="mfooter"><div class="mtt"> <a href="https://mobile.facebook.com/groups/440884309432869?refid=27"><img title="Facebook" alt="Facebook - Hmtsoft.com" src="http://hmtamim.xtgem.com/css/56.png"/> </a><a href="https://mobile.facebook.com/groups/440884309432869?refid=27"><img title="Twitter" alt="Twitter - Hmtsoft.com" style="width:31px" src="http://hmtamim.xtgem.com/css/53.png"/> </a><a href="https://mobile.facebook.com/groups/440884309432869?refid=27"> <img title="Google Plus" alt="Google plus - Hmtsoft.com" src="http://hmtamim.xtgem.com/css/52.png"/> </a><a href="https://mobile.facebook.com/groups/440884309432869?refid=27"><img title="Youtube" alt="Youtube - Hmtsoft.com" src="http://hmtamim.xtgem.com/css/55.png"/></a> <a href="#top"> <span style="float: right"> <img alt="Back to top" src="http://hmtamim.xtgem.com/css/57.png"/></span></a></div> <div class="mtb"></div> <ul class="mleft"><li> <a href="/site_index.xhtml">Home</a></li><li> <a href="/site_disclaimer.xhtml">Disclaimer</a></li><li> <a href="http://wealthyhome.wapka.mobi/site_privacy-policy.xhtml">Privacy policy </a> </li><li> </li> </ul><ul class="mright"> <li><a href="/site_about.xhtml">About us</a></li> <li> <a href="/site_contact.xhtml"> Contact us</a></li> <li> <a href="/site_copyright_issues.xhtml">Copyright issue </a> </li> </ul> <div style="clear: both; display: block"></div></div>

From the above code , I cut out a code line and looking at the code line you can see I don't just cut it out but I respected the syntax rules by starting from

and i ended with

which is the end of the code I wanted

<p align="center"><div class="new"><br/><font color="red"><b>WARNING:-</b></font> Note any code copied from other sites to merge with our <b>tutorials </b>rather than using the <u>provided codes </u>is at you own <b>Risk</b> </div></p>

You can cut out any code from the above respecting the syntax rules as explained above .

When you want to cut out any code from plenty codes in your source viewer first of all locate the code by checking some keywords e.g of you have Olamide inside the code you want to copy use that keyword to find the code inside your plenty code as soon as you see olamide you should know you are around the code .

Trace the code to the starting point and copy from the starting point of that particular code to its end point leaving other codes behind just focus on the code lines you Want to cut out.

There is nothing i can explain more than i have done above go and practice with the above. keep trying even when when you get error messages as time goes on you will become perfect.

When editing syntax errors in your wapka site each time you see something like incorrect place of div bold is expected that simply means inside your code there is somewhere the div is present and instead of it you should replace it with bold

read your errors , understand them and you will be able to fix them id=""

Meet me on facebook

If you love this post share it!
Share Button


Kennedy Prosper is a top Blogger in Nigeria whose aim and reputation is finding solutions and helping beginner bloggers Online and offline.if you want to know more about me ask google

Follow me on: Twitter |Facebook| Google Plus

Previous
Next Post »