Skip to content

haraphat01/html_linter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Html Checker

This is a basic Html checker that checks Html codes if you properly used the tags or not and also corroborate good SEO practice.

screenshot

How it works

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

Examples

Below is an the code of a bad SEO HTML tag

  • index.html

  • Linter output

screenshot

Built With

  • Ruby

How to run Linter

  • 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

How to run Test

-after cloning the repo on your local machine -make sure you have rspec installed on your machine

  • type 'rspec' to test it

Video description of the project

click here to watch the video

Requirements

  • Ruby
  • Colorize
  • Nokogiri

👤 Arafat Akata

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

About

Linters built with ruby to check your HTML code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published