It is not possible to connect a web browser directly with a peer container. This is because a peer is running container running inside a server. You can create a API (exposing a specific defined port of your choice. You should be cautious of which port you eventually choose because a Hyperledger fabric network uses a lot of ports.) that connects with the Hyperledger Fabric Blockchain server (which all the necessary components are deployed). You can invoke and query a smart contract from a browser to that server, by defining the routes of the api and writing the necessary code inside API, in order to receive the data and pass then to the chaincode.