HTML is a forgiving language and, therefore, pages will render without the use of the doctype or and elements. Without a doctype and these structural elements, pages will not render properly in every browser.
Unformatted way
Hello World
This is a web page.
formatted way
Hello World
This is a web page.
How to create Syntax Organized
- Use lowercase letters within element names, attributes, and values
- Indent nested elements
- Strictly use double quotes, not single or completely omitted quotes
- Remove the forward slash at the end of self-closing elements
See Example : Unformatted way
India
City in Illinois
-
- 234 square miles
-
- 2.715 lacs residents
-
Formatted way
India
City in Illinois
-
- 234 square miles
-
- 2.715 lacs residents
-
Use the Alternative Text Attribute on Images
We should use always alt tag beacause alt attribute to provide context for images, example like-
Unformatted way
.button,a {background:#ffffff; color:#ff0000;font-size:14px;}
Formatted way
.button,
a {
background:#ffffff;
color:#ff0000;
font-size:14px;
}
Shorthand Properties
.button {
margin:10px 5px 0 0;
padding-left:10px;
}
Thanks
Darshan dang
More From Oodles
Ready to innovate? Let's get in touch
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Darshan Dang
Darshan is a creative UI designer with experience and capabilities to build compelling UI designs for Web and Mobile Applications. Darshan likes Punjabi songs and Travelling in Free Time .