# Detect mobile / desktop screen on hubl coding?

**URL:** <https://community.hubspot.com/t/detect-mobile-desktop-screen-on-hubl-coding/74822>\
**Category:** CMS Development\
**Created:** [February 9, 2023, 8:43am UTC](https://community.hubspot.com/t/detect-mobile-desktop-screen-on-hubl-coding/74822 "2023-02-09T08:43:45Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![DeZinerly](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dezinerly/32/3132_2.png) [@DeZinerly](https://community.hubspot.com/u/DeZinerly)\
**Post date:** [October 26, 2023, 10:44pm UTC](https://community.hubspot.com/t/detect-mobile-desktop-screen-on-hubl-coding/74822/6 "2023-10-26T22:44:53Z")

</div>

Hey, thanks a ton for the clear examples, @Thomastechweb! I just wanted to point out that an alternative to

```lia-code-sample
{% if !is_mobile %}
...
{% endif %}

```

would be

```lia-code-sample
{% unless is_mobile %}
...
{% endunless %}

```

Some HubL students finding this post (such as myself 🤠) may feel it’s easier to scan their code logic this way.

---

_[View the full topic](https://community.hubspot.com/t/detect-mobile-desktop-screen-on-hubl-coding/74822)._
