HTML standards & HTML syntax For HTML5 flash developer || Part-4

HTML standards

The World Wide Web Consortium (http://www.w3.org/) or W3C, is responsible for creating the standards on which HTML is developed today. These web development standards have been created as an attempt to unify the syntax and functionality developers create web pages with, as well as the feature set integrated in web browsers to enable these features
in HTML. By writing web applications  in a compliant markup that follows the HTML specification standards, developers can
better ensure that their content will be displayed properly no matter how a user chooses to view it.

HTML syntax


Though it may look trivial, HTML syntax is the core of all web pages. Regardless of whether it is hardcoded within an HTML file, compiled from another programming language source, or injected into a document during application runtime, HTML syntax is the blueprint for the assets used within an HTML page. The better a developer understands HTML syntax and its limitations, the easier it will be for them to build their applications.

HTML syntax is written with the use of tag elements which are wrapped in angle brackets. HTML tags come in two different varieties: paired or empty elements. Paired HTML tags are the most common and the first tag style that one usually uses when creating an HTML document. The html tag is used to declare what is within an HTML document and usually sits on the first and last lines of an HTML file:

<html>
Add your HTML content here.
</html>


As you can see in the previous example, paired tags open and close a container for more HTML elements to sit inside. Tags are always formatted the same, the only difference between each tag in the pair is that a forward slash is used to declare that a tag is closing an element. Therefore, <html> will not pair with any tag that does not contain the same internal value. HTML tags are case insensitive, and in the early days it was common for developers to always use capitals when writing tags. That tradition has now disappeared and you will almost always see tags written in lower case.

Empty HTML tags are written without the use of a closure tag. For example, when placing an image reference within an HTML document, there is no further HTML element content that can be placed within that image. Therefore, image references in HTML are formatted such as  <imgsrc="my_image.jpg">. The image is referenced within the img tag by appending the src parameter with its value set to the image location.

If you have managed to use Adobe Flex to build any of your Flash content and utilized the MXML user interface markup language, you may have got the hang of closing empty tag elements with syntax such as <imgsrc="my_image.jpg" />. In HTML5, this trailing forward slash is not required but will still render your content properly if you happen to append it. For best use case, try to get in the habit of not using it in your HTML5 projects.

HTML is a tricky beast when it comes to debugging; a document with HTML errors in the syntax will not display errors on loading like a traditional Flash application. Writing clean and concise HTML is the key to maintaining an error-free, standard, compliant web page. There are many applications and tools available to aid in developing clean HTML code, some of which will be covered later in the book. The W3C has created a robust HTML syntax validation service, which will check a publicly available website for HTML errors (http://validator.w3.org/).

The Next Post:HTML elements And Bringing in the style for Html5 Flash developer || Part-5
Home: Web Tutorials.
Next Post Previous Post
No Comment
Add Comment
comment url