This is a basic Html checker that checks Html codes if you properly used the tags or not and also corroborate good SEO practice.
This linter forces users on the proper usage of html elements and also exposes them to good exposes them to basics of SEO.
- The Linter checks if the head tag is present
- It checks whether the codes have a title
- It checks if the title's character is within the required length
- It checks if the image tag has an attribute of alt.
- It checks the number of h1 in the code, which is recommended to be one only
Below is an the code of a bad SEO HTML tag
-
index.html
-
Linter output
- Ruby
- Clone the repo on your local machine
- Cd into the folder
- Add Nokogiri gem to your machine if you don't have it by typing 'gem install nokogiri'
- Run this command line: ruby bin/main.rb
-after cloning the repo on your local machine -make sure you have rspec installed on your machine
- type 'rspec' to test it
- Ruby
- Colorize
- Nokogiri
👤 Arafat Akata
- Github: @haraphat01
- Twitter: @haraphat01
Give a ⭐️ if you like this project!
- Hat tip to Microverse