Is it possible for <h1></h1>
and h1:before{ content: "title";}
to function in the same way as <h1>title</h1>
?
As I develop a responsive web page, I want my name to be displayed at the top as a title within h1 tags such as "John Smith". However, on mobile browsers, the full name may not fit well with the navigation bar. In this case, I would like it to only display "John" on a mobile browser. By using a media query in my CSS along with the :before
pseudo-element to adjust the content based on the viewport size, I can achieve this design.
Would having "John Smith" between the h1 tags still validate for SEO purposes?