ı have been trying to make a adaptive web design but there is no tutorials on the web what should ı do?
Not quite sure what you are asking: a link (with a few exceptions) is always to an HTML document, that what it’s for.
ı mean ı need to make adaptive website so it should be activate the html and the css you can make css but it doesnt let me pu html files on it. ı mean ı do it media tag the code is " media=screen and (max-device-width: 768px)"
You mean the link tag in the head, rather than an anchor tag? No you can’t, there is no reason to. To serve a completely different layout at a different URL, you’ll need some JS & then redirect to a new HTML page. It’s normally easier if you have a backend system serving HTML pages (Rails, Django, Express etc)
FYI this is a very difficult way to build websites, with very few upsides – it’s a huge pita when you could just do responsive design and use media queries in the CSS
so please can you tell me how can ı design the adaptive web please tell me.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
try this between head and style tag
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
Please use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.
Make an HTML page for mobile
Make an HTML page for desktop
If the user is on a mobile device, redirect to the mobile page
If the user is on a desktop, redirect to the desktop page
Here is the first link that appears when I search for “set up redirects for adaptive design” on Google:
Note that half of these are using user-agent strings to check what device the user is viewing the site on; this kinda works, but is not at all recommended (the article notes this).
Again, I would stress that writing a responsive site is far, far easier (ie just using CSS media queries + HTML elements like <picture>
or the <img>
srcset
attribute to change how the page is displayed at different sizes).