How is this achieved in CSS?

#1

Some pages, when opened have the caret already in the field so you can start typing. Others don’t and you have to click on the first field with the mouse before typing.

What’s the markup for having the caret already in the field? I thought it was :blur or :focus, but I don’t see them used that way in the docs.

#2

It’s not done in CSS but in HTML autofocus.

4 Likes
#3

Those are pseudo classes for styling inputs in those particular states.
Remember CSS is only visual.

4 Likes