The consortium (https://www.khronos.org/webgl/) definition is quoted below.
WebGL is a cross-platform, royalty-free web standard for a low-level 3D graphics API based on OpenGL ES 2.0, exposed through the HTML5 Canvas element as Document Object Model interfaces. Developers familiar with OpenGL ES 2.0 will recognize WebGL as a Shader-based API using GLSL, with constructs that are semantically similar to those of the underlying OpenGL ES 2.0 API. It stays very close to the OpenGL ES 2.0 specification, with some concessions made for what developers expect out of memory-managed languages such as JavaScript.
OpenGL and WebGL have similar semantics but are coded in different languages. You will see at the basic level that most of differences are in the programming language constructs of C/C++ vs JavaScript
WebGL and OpenGL shows the similarities between the two, OpenGL in C/C++ and WebGL in JavaScript.