π Always Quote Attribute Values
β HTML allows attribute values without quotes.
β However, we recommend quoting attribute values, because:
β’ Developers normally quote attribute values.
β’ Quoted values are easier to read.
β’ You must use quotes if the value contains spaces.
π Always Specify alt, width, and height for Images
β Always specify the alt attribute for images.
β This attribute is important if the image for some reason cannot be displayed.
β Also, always define the width and height of images.
β This reduces flickering, because the browser can reserve space for the image before loading.
π Spaces and Equal Signs
β HTML allows spaces around equal signs.
β But space-less is easier to read and groups entities better together.
π Blank Lines and Indentation
β Do not add blank lines, spaces, or indentations without a reason.
β For readability, add blank lines to separate large or logical code blocks.
β For readability, add two spaces of indentation.
β Do not use the tab key.
π Good Table Example
π Omitting <html>, <head> and <body>
π Add the lang Attribute
β You should always include the lang attribute inside the <html> tag, to declare the language of the Web page.
β This is meant to assist search engines and browsers.
Thanks for reading this thread β€οΈ
If you like it , make sure you:
π· Like the tweet
π· Retweet the first tweet β‘
For more content , follow:
@MrunayU