How to reference websites on “\bibliographystyle{model1-num-names}” Elsevier Scientific Article template

@Misc{APAWeb,
title        = {{Socioeconomic Status}},
howpublished = {{https://www.apa.org/topics/socioeconomic-status/}},
note         = {{Accessed: 2019-02-16}},
url          = {https://www.apa.org/topics/socioeconomic-status/},
urldate      = {2019-02-16},
}

\documentclass[a4paper,12pt]{elsarticle}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{lineno}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{threeparttable}
\usepackage{lscape}
\usepackage{gensymb}
\usepackage{textcomp}
\usepackage{mhchem}

\bibliographystyle{model1-num-names}
\bibliography{XYZ.bib}

• Please add a MWE. Welcome to TeX.SE. – Raaja Mar 23 at 7:24

1 Answer

The ???? issue arises because the model1-num-names bibliography style expects to find a non-empty year field in an entry of type @misc. The entry at hand contains a field called urldate, but none called year.

Given that the model1-num-names bibliography style does know what to do with a field called url, you should probably delete the redundant howpublished field. (If you do decide to keep the howpublished field, you should encase its contents in a \url directive if the contents consist of a URL string.)

\RequirePackage{filecontents}
\begin{filecontents}{XYZ.bib}
@Misc{APAWeb,
title         = {{Socioeconomic Status}},
xhowpublished = {\url{https://www.apa.org/topics/socioeconomic-status/}},
note          = {{Accessed}: 2019-02-16},
url           = {https://www.apa.org/topics/socioeconomic-status/},
xurldate      = {2019-02-16},
year          = 2019,
}
\end{filecontents}

\documentclass[a4paper,12pt]{elsarticle}
%% I've commented out all preamble instructions
%% that are irrelevant to the problem at hand.
%\usepackage{graphicx}
%\usepackage{amssymb}
%\usepackage{lineno}
%\usepackage{multirow}
%\usepackage{multicol}
%\usepackage{threeparttable}
%\usepackage{lscape}
%\usepackage{gensymb}
%\usepackage{textcomp}
%\usepackage{mhchem}
\bibliographystyle{model1-num-names} % from https://www.elsevier.com/authors/author-schemas/latex-instructions
\usepackage{xurl} % allow line breaks anywhere in a URL string

\begin{document}
\cite{APaWeb}
\bibliography{XYZ} % don't inlcude the ".bib" extension
\end{document}