Hello World

pragma specifies the compiler version of Solidity.

// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.6.10 and less than 0.7.0
pragma solidity ^0.6.10;

contract HelloWorld {
    string public greet = "Hello World!";
}

Try on Remix