How do you prevent the user from selecting the text rendered inside the following element?
You can use the user-select property to disable text selection of an element. In web browsers, if you double-click on some text it will be selected/highlighted. This property can be used to prevent this.